summaryrefslogtreecommitdiff
path: root/it_url.class
diff options
context:
space:
mode:
authorUrban Müller2017-07-06 14:31:10 +0200
committerUrban Müller2017-07-06 14:31:10 +0200
commit1d3b2ef50429d891c123f647ed47c5395ed4463f (patch)
tree13831de713171944be0018bb0dae0b6f343489dc /it_url.class
parentd652d974d32ea87b29ae1d741bd36b6d91d5f210 (diff)
downloaditools-1d3b2ef50429d891c123f647ed47c5395ed4463f.tar.gz
itools-1d3b2ef50429d891c123f647ed47c5395ed4463f.tar.bz2
itools-1d3b2ef50429d891c123f647ed47c5395ed4463f.zip
avoid permission problems in /cleaned if ::get_cache
Diffstat (limited to 'it_url.class')
-rw-r--r--it_url.class2
1 files changed, 1 insertions, 1 deletions
diff --git a/it_url.class b/it_url.class
index c32eb91..78dc769 100644
--- a/it_url.class
+++ b/it_url.class
@@ -607,7 +607,7 @@ function get_cache($p = array())
# cache cleanup at night
if (date('H') >= 1 && (date('H')*3600 + date('i')*60 < $p['cleanbefore']) && (time()-@filemtime($p['cachedir'] . "/cleaned") > 80000))
{
- touch($p['cachedir'] . "/cleaned");
+ 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 &");
}