Permalink
Browse files

Merge pull request #5108 from mirakui/patch-1

Bug: cache_key.size doesn't return length of filename but size of file
  • Loading branch information...
2 parents fd74cd7 + 0b1ce07 commit 12e2405a276e783791c34432272f22ad3517a140 @tenderlove tenderlove committed Feb 21, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 activesupport/lib/active_support/cache/file_store.rb
View
2 activesupport/lib/active_support/cache/file_store.rb
@@ -143,7 +143,7 @@ def key_file_path(key)
# Translate a file path into a key.
def file_path_key(path)
- fname = path[cache_path.size, path.size].split(File::SEPARATOR, 4).last
+ fname = path[cache_path.to_s.size..-1].split(File::SEPARATOR, 4).last
Rack::Utils.unescape(fname)
end

0 comments on commit 12e2405

Please sign in to comment.