Skip to content

Commit

Permalink
Merge pull request #36941 from ts-3156/master
Browse files Browse the repository at this point in the history
Ignore Errno::ENOTEMPTY when calling AS::Cache::FileStore#clear with race conditions
  • Loading branch information
rafaelfranca committed Apr 13, 2020
1 parent da8f631 commit 320734e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion activesupport/lib/active_support/cache/file_store.rb
Expand Up @@ -36,7 +36,7 @@ def self.supports_cache_versioning?
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.
Expand Down

0 comments on commit 320734e

Please sign in to comment.