Skip to content

Commit a0fb2b2

Browse files
authored
Merge pull request rails#36941 from ts-3156/master
Ignore Errno::ENOTEMPTY when calling AS::Cache::FileStore#clear with race conditions
2 parents 205d0c6 + b7e440e commit a0fb2b2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

activesupport/lib/active_support/cache/file_store.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ def self.supports_cache_versioning?
3636
def clear(options = nil)
3737
root_dirs = (Dir.children(cache_path) - GITKEEP_FILES)
3838
FileUtils.rm_r(root_dirs.collect { |f| File.join(cache_path, f) })
39-
rescue Errno::ENOENT
39+
rescue Errno::ENOENT, Errno::ENOTEMPTY
4040
end
4141

4242
# Preemptively iterates through all stored keys and removes the ones which have expired.

0 commit comments

Comments
 (0)