diff options
author | Christian Schneider | 2024-04-30 10:39:32 +0200 |
---|---|---|
committer | Christian Schneider | 2024-04-30 10:39:32 +0200 |
commit | d6a73f40ff8c291207274979e3a575da2ae0c0eb (patch) | |
tree | 9efc79e44252985450006345856658d57967f1ba | |
parent | 9238b32da3afc88b80b1d51a15844fa0c1e8a9f6 (diff) | |
download | itools-d6a73f40ff8c291207274979e3a575da2ae0c0eb.tar.gz itools-d6a73f40ff8c291207274979e3a575da2ae0c0eb.tar.bz2 itools-d6a73f40ff8c291207274979e3a575da2ae0c0eb.zip |
Only delete cache files (not directories) to avoid race with directory creation
-rw-r--r-- | it_url.class | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/it_url.class b/it_url.class index 83ea9fb..abaf9e6 100644 --- a/it_url.class +++ b/it_url.class @@ -701,7 +701,7 @@ static function get_cache($p = array()) { it::file_put($p['cachedir'] . "/cleaned", ""); # touch could have permission problems $maxagemin = intval($p['maxage']/60); - exec("nohup bash -c 'cd {$p['cachedir']} && for i in ??; do sleep 20; ionice -c 3 find \$i -mmin +$maxagemin -delete; done' </dev/null >/dev/null 2>&1 &"); + exec("nohup bash -c 'cd {$p['cachedir']} && for i in ??; do sleep 20; ionice -c 3 find \$i -mmin +$maxagemin -type f -delete; done' </dev/null >/dev/null 2>&1 &"); } if (EDC('getcachelog')) |