aboutsummaryrefslogtreecommitdiffstats
path: root/apps/gallery/lib/managers.php
diff options
context:
space:
mode:
Diffstat (limited to 'apps/gallery/lib/managers.php')
-rw-r--r--apps/gallery/lib/managers.php5
1 files changed, 4 insertions, 1 deletions
diff --git a/apps/gallery/lib/managers.php b/apps/gallery/lib/managers.php
index d4d978dbdd0..fcce3f40e23 100644
--- a/apps/gallery/lib/managers.php
+++ b/apps/gallery/lib/managers.php
@@ -86,7 +86,10 @@ class ThumbnailsManager {
}
public function delete($path) {
- unlink(\OCP\Config::getSystemValue('datadirectory').'/'.\OC_User::getUser()."/gallery".$path);
+ $thumbnail = \OCP\Config::getSystemValue('datadirectory').'/'.\OC_User::getUser()."/gallery".$path;
+ if (file_exists($thumbnail)) {
+ unlink($thumbnail);
+ }
}
private function __construct() {}