From dd515da889d642ae68210a8b7e91ac587d3cdee7 Mon Sep 17 00:00:00 2001 From: Max Kostikov Date: Wed, 19 Jun 2019 23:13:53 +0200 Subject: Remove cached photo location directory on delete if empty --- Zotlabs/Daemon/Cron.php | 1 + 1 file changed, 1 insertion(+) (limited to 'Zotlabs') 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); } } -- cgit v1.2.3