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
2 parents 205d0c6 + b7e440e commit a0fb2b2
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 a0fb2b2

Please sign in to comment.