Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
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...
commit 12e2405a276e783791c34432272f22ad3517a140 2 parents fd74cd7 + 0b1ce07
@tenderlove tenderlove authored
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.
Something went wrong with that request. Please try again.