Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

use corresponding path name for cached files

If there are two different coffee files with the same name
sitting in different directories, cache would serve them
incorrectly thus breaking the application.
  • Loading branch information...
commit 3fa03d50ae3397c1aa01c24aac2453bf2d6d7600 1 parent 1ada493
Kent Sibilev authored
Showing with 3 additions and 1 deletion.
  1. +3 −1 lib/rack/coffee.rb
View
4 lib/rack/coffee.rb
@@ -39,7 +39,9 @@ def set_cache_header_opts(given)
def brew(file)
if cache_compile_dir
- cache_file = cache_compile_dir + "#{file.mtime.to_i}_#{file.basename}"
+ path = cache_compile_dir + file.dirname
+ path.mkpath
+ cache_file = path + "#{file.mtime.to_i}_#{file.basename}"
if cache_file.file?
cache_file.read
else
Please sign in to comment.
Something went wrong with that request. Please try again.