Permalink
Browse files

Reducing ActiveSupport::Cache::FILENAME_MAX_SIZE to 116 to support ec…

…ryptfs,

where the maximum filename length is approximately 143 (see
http://unix.stackexchange.com/a/32834).
  • Loading branch information...
1 parent da27fa1 commit cc5076b47c78caccd7a62d299d961bf1b7ba0c3c @jarl-dk jarl-dk committed Sep 30, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 activesupport/lib/active_support/cache/file_store.rb
@@ -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)

0 comments on commit cc5076b

Please sign in to comment.