diff --git a/activesupport/lib/active_support/cache/file_store.rb b/activesupport/lib/active_support/cache/file_store.rb index 58b7b53016..2d5249a699 100644 --- a/activesupport/lib/active_support/cache/file_store.rb +++ b/activesupport/lib/active_support/cache/file_store.rb @@ -36,7 +36,7 @@ module ActiveSupport def clear(options = nil) root_dirs = (Dir.children(cache_path) - GITKEEP_FILES) FileUtils.rm_r(root_dirs.collect { |f| File.join(cache_path, f) }) - rescue Errno::ENOENT + rescue Errno::ENOENT, Errno::ENOTEMPTY end # Preemptively iterates through all stored keys and removes the ones which have expired.