aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs/Daemon/Cron.php
diff options
context:
space:
mode:
authorMax Kostikov <max@kostikov.co>2019-06-19 23:13:53 +0200
committerMax Kostikov <max@kostikov.co>2019-06-19 23:13:53 +0200
commitdd515da889d642ae68210a8b7e91ac587d3cdee7 (patch)
treef1fa9434eadc4aafd8691896d092d9a949df6d56 /Zotlabs/Daemon/Cron.php
parentdb8e46184bc6fae92d05a8992acab8c14e67aef1 (diff)
downloadvolse-hubzilla-dd515da889d642ae68210a8b7e91ac587d3cdee7.tar.gz
volse-hubzilla-dd515da889d642ae68210a8b7e91ac587d3cdee7.tar.bz2
volse-hubzilla-dd515da889d642ae68210a8b7e91ac587d3cdee7.zip
Remove cached photo location directory on delete if empty
Diffstat (limited to 'Zotlabs/Daemon/Cron.php')
-rw-r--r--Zotlabs/Daemon/Cron.php1
1 files changed, 1 insertions, 0 deletions
diff --git a/Zotlabs/Daemon/Cron.php b/Zotlabs/Daemon/Cron.php
index 8b6b42c8a..c99892ffb 100644
--- a/Zotlabs/Daemon/Cron.php
+++ b/Zotlabs/Daemon/Cron.php
@@ -108,6 +108,7 @@ class Cron {
$file = dbunescbin($rr['content']);
if(is_file($file)) {
@unlink($file);
+ @rmdir(dirname($file));
logger('info: deleted cached photo file ' . $file, LOGGER_DEBUG);
}
}