aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/lib/active_support
diff options
context:
space:
mode:
authorMarcos Tapajos <tapajos@gmail.com>2012-01-13 00:14:11 -0200
committerMarcos Tapajos <tapajos@gmail.com>2012-01-13 13:28:16 -0200
commite5425c8f68fbb720fcbf4b14e1f154ac27dbbbed (patch)
tree8df2ae95ae099b6a3daefaa758222517bc489ea8 /activesupport/lib/active_support
parent1e69181c5f4120d604fe86a9c2620694760d6c8e (diff)
downloadrails-e5425c8f68fbb720fcbf4b14e1f154ac27dbbbed.tar.gz
rails-e5425c8f68fbb720fcbf4b14e1f154ac27dbbbed.tar.bz2
rails-e5425c8f68fbb720fcbf4b14e1f154ac27dbbbed.zip
Cache (FileStore) clear should keep .gitkeep
Diffstat (limited to 'activesupport/lib/active_support')
-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 9460532af0..1604cd12af 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