1 # Copyright (C) The Arvados Authors. All rights reserved.
3 # SPDX-License-Identifier: AGPL-3.0
5 class SaferFileStore < ActiveSupport::Cache::FileStore
7 def delete_empty_directories(dir)
8 # It is not safe to delete an empty directory. Another thread or
9 # process might be in write_entry(), having just created an empty
10 # directory via ensure_cache_path(). If we delete that empty
11 # directory, the other thread/process will crash in
12 # File.atomic_write():
14 # #<Errno::ENOENT: No such file or directory @ rb_sysopen - /.../tmp/cache/94F/070/.permissions_check.13730420.54542.801783>