mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Merge pull request #36941 from ts-3156/master
Ignore Errno::ENOTEMPTY when calling AS::Cache::FileStore#clear with race conditions
This commit is contained in:
commit
a0fb2b2227
1 changed files with 1 additions and 1 deletions
|
@ -36,7 +36,7 @@ module ActiveSupport
|
||||||
def clear(options = nil)
|
def clear(options = nil)
|
||||||
root_dirs = (Dir.children(cache_path) - GITKEEP_FILES)
|
root_dirs = (Dir.children(cache_path) - GITKEEP_FILES)
|
||||||
FileUtils.rm_r(root_dirs.collect { |f| File.join(cache_path, f) })
|
FileUtils.rm_r(root_dirs.collect { |f| File.join(cache_path, f) })
|
||||||
rescue Errno::ENOENT
|
rescue Errno::ENOENT, Errno::ENOTEMPTY
|
||||||
end
|
end
|
||||||
|
|
||||||
# Preemptively iterates through all stored keys and removes the ones which have expired.
|
# Preemptively iterates through all stored keys and removes the ones which have expired.
|
||||||
|
|
Loading…
Reference in a new issue