You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@whimsical.apache.org by se...@apache.org on 2017/10/24 19:49:40 UTC
[whimsy] branch master updated: Don't crash if no files found
This is an automated email from the ASF dual-hosted git repository.
sebb pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/whimsy.git
The following commit(s) were added to refs/heads/master by this push:
new eb671c5 Don't crash if no files found
eb671c5 is described below
commit eb671c53401bff722cefc034aff9c421861d10c2
Author: Sebb <se...@apache.org>
AuthorDate: Tue Oct 24 20:49:38 2017 +0100
Don't crash if no files found
---
www/board/agenda/routes.rb | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/www/board/agenda/routes.rb b/www/board/agenda/routes.rb
index a4c066c..a362dab 100755
--- a/www/board/agenda/routes.rb
+++ b/www/board/agenda/routes.rb
@@ -20,7 +20,11 @@ end
# redirect root to latest agenda
get '/' do
agenda = dir('board_agenda_*.txt').sort.last
- redirect "#{request.path}#{agenda[/\d+_\d+_\d+/].gsub('_', '-')}/"
+ if agenda == ''
+ _html :not_found
+ else
+ redirect "#{request.path}#{agenda[/\d+_\d+_\d+/].gsub('_', '-')}/"
+ end
end
# redirect shepherd to latest agenda
--
To stop receiving notification emails like this one, please contact
['"commits@whimsical.apache.org" <co...@whimsical.apache.org>'].