aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/lib
diff options
context:
space:
mode:
authorAaron Patterson <aaron.patterson@gmail.com>2012-05-03 15:56:54 -0700
committerAaron Patterson <aaron.patterson@gmail.com>2012-05-03 15:56:54 -0700
commit7a3e43cc58a2d5d00d3e9fa8c9ab5583ffa5cf00 (patch)
treefca445c985b6cdc4357eab1c945f6ba426efd2a1 /activesupport/lib
parentb55b77f1ef76a59db15ebe71ce28e070534a6d29 (diff)
parente5425c8f68fbb720fcbf4b14e1f154ac27dbbbed (diff)
downloadrails-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.rb2
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