diff --git a/lib/madness/server_helper.rb b/lib/madness/server_helper.rb index 5bb3973..d1b71f8 100644 --- a/lib/madness/server_helper.rb +++ b/lib/madness/server_helper.rb @@ -25,7 +25,7 @@ def log(obj) # Search for static file, first in the users docroot, then in the template # directory. def find_static_file(path) - return nil if disallowed_static(path) + return nil if disallowed_static?(path) candidates = [ "#{config.path}/#{path}", @@ -39,7 +39,7 @@ def find_static_file(path) nil end - def disallowed_static(path) + def disallowed_static?(path) path.end_with?('.md') || path.empty? || File.basename(path).start_with?('.') end end