Skip to content

Commit

Permalink
No need to create a range object
Browse files Browse the repository at this point in the history
  • Loading branch information
spastorino committed Sep 22, 2011
1 parent 52edadf commit 1b780cc
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions activesupport/lib/active_support/cache/file_store.rb
Expand Up @@ -142,13 +142,13 @@ def key_file_path(key)
hash, dir_1 = hash.divmod(0x1000)
dir_2 = hash.modulo(0x1000)
fname_paths = []

# Make sure file name doesn't exceed file system limits.
begin
fname_paths << fname[0...FILENAME_MAX_SIZE]
fname_paths << fname[0, FILENAME_MAX_SIZE]
fname = fname[FILENAME_MAX_SIZE..-1]
end until fname.blank?

File.join(cache_path, DIR_FORMATTER % dir_1, DIR_FORMATTER % dir_2, *fname_paths)
end

Expand Down

0 comments on commit 1b780cc

Please sign in to comment.