diff options
author | Aaron Patterson <aaron.patterson@gmail.com> | 2012-05-03 15:56:54 -0700 |
---|---|---|
committer | Aaron Patterson <aaron.patterson@gmail.com> | 2012-05-03 15:56:54 -0700 |
commit | 7a3e43cc58a2d5d00d3e9fa8c9ab5583ffa5cf00 (patch) | |
tree | fca445c985b6cdc4357eab1c945f6ba426efd2a1 /activesupport/lib | |
parent | b55b77f1ef76a59db15ebe71ce28e070534a6d29 (diff) | |
parent | e5425c8f68fbb720fcbf4b14e1f154ac27dbbbed (diff) | |
download | rails-7a3e43cc58a2d5d00d3e9fa8c9ab5583ffa5cf00.tar.gz rails-7a3e43cc58a2d5d00d3e9fa8c9ab5583ffa5cf00.tar.bz2 rails-7a3e43cc58a2d5d00d3e9fa8c9ab5583ffa5cf00.zip |
Merge pull request #4452 from tapajos/e5425c8f68fbb720fcbf4b14e1f154ac27dbbbed
Fix cache (FileStore) clear to keep .gitkeep.
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 8e6a3bc5a8..e7316b23b3 100644 --- a/activesupport/lib/active_support/cache/file_store.rb +++ b/activesupport/lib/active_support/cache/file_store.rb @@ -23,7 +23,7 @@ module ActiveSupport end def clear(options = nil) - root_dirs = Dir.entries(cache_path).reject{|f| f.in?(EXCLUDED_DIRS)} + root_dirs = Dir.entries(cache_path).reject{|f| f.in?(EXCLUDED_DIRS + [".gitkeep"])} FileUtils.rm_r(root_dirs.collect{|f| File.join(cache_path, f)}) end |