diff options
author | Aaron Patterson <aaron.patterson@gmail.com> | 2012-02-21 09:14:19 -0800 |
---|---|---|
committer | Aaron Patterson <aaron.patterson@gmail.com> | 2012-02-21 09:14:19 -0800 |
commit | 12e2405a276e783791c34432272f22ad3517a140 (patch) | |
tree | c50a860704aa39346408afbde62a527e0cce0701 /activesupport/lib | |
parent | fd74cd78885080b00722749c4746a0aefd897e5c (diff) | |
parent | 0b1ce078228f404be63378c000e1af0ee992a321 (diff) | |
download | rails-12e2405a276e783791c34432272f22ad3517a140.tar.gz rails-12e2405a276e783791c34432272f22ad3517a140.tar.bz2 rails-12e2405a276e783791c34432272f22ad3517a140.zip |
Merge pull request #5108 from mirakui/patch-1
Bug: cache_key.size doesn't return length of filename but size of file
Diffstat (limited to 'activesupport/lib')
-rw-r--r-- | activesupport/lib/active_support/cache/file_store.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/activesupport/lib/active_support/cache/file_store.rb b/activesupport/lib/active_support/cache/file_store.rb index 9460532af0..b7712a4a15 100644 --- a/activesupport/lib/active_support/cache/file_store.rb +++ b/activesupport/lib/active_support/cache/file_store.rb @@ -143,7 +143,7 @@ module ActiveSupport # 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 |