lib/sinatra/assetpack/options.rb in sinatra-assetpack-0.3.1 vs lib/sinatra/assetpack/options.rb in sinatra-assetpack-0.3.2
- old
+ new
@@ -214,10 +214,10 @@
end
# Returns the local file for a given URI path.
# Returns nil if a file is not found.
def local_file_for(request)
- request.squeeze!('/')
+ request = request.squeeze('/')
serve_path, from = served.detect { |path, _| request.start_with?(path) }
return if !from
path = File.join(expand_from(from), request.sub(serve_path, ''))