Skip to content

Commit

Permalink
Reducing ActiveSupport::Cache::FILENAME_MAX_SIZE to 116 to support ec…
Browse files Browse the repository at this point in the history
…ryptfs,

where the maximum filename length is approximately 143 (see
http://unix.stackexchange.com/a/32834).
  • Loading branch information
jarl-dk committed Sep 30, 2012
1 parent da27fa1 commit cc5076b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion activesupport/lib/active_support/cache/file_store.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ class FileStore < Store
attr_reader :cache_path

DIR_FORMATTER = "%03X"
FILENAME_MAX_SIZE = 228 # max filename size on file system is 255, minus room for timestamp and random characters appended by Tempfile (used by atomic write)
FILENAME_MAX_SIZE = 116 # max filename size on file system is normally 255 (but 143 on ecryptfs), minus room for timestamp and random characters appended by Tempfile (used by atomic write)
EXCLUDED_DIRS = ['.', '..'].freeze

def initialize(cache_path, options = nil)
Expand Down

0 comments on commit cc5076b

Please sign in to comment.