mirror of
https://github.com/valitydev/salt.git
synced 2024-11-07 17:09:03 +00:00
Merge pull request #23594 from rallytime/bp-23496
Backport #23496 to 2014.7
This commit is contained in:
commit
1acaf86da7
@ -215,7 +215,9 @@ def reap_fileserver_cache_dir(cache_base, find_func):
|
||||
# This will only remove the directory on the second time
|
||||
# "_reap_cache" is called (which is intentional)
|
||||
if len(dirs) == 0 and len(files) == 0:
|
||||
os.rmdir(root)
|
||||
# only remove if empty directory is older than 60s
|
||||
if time.time() - os.path.getctime(root) > 60:
|
||||
os.rmdir(root)
|
||||
continue
|
||||
# if not, lets check the files in the directory
|
||||
for file_ in files:
|
||||
|
Loading…
Reference in New Issue
Block a user