summaryrefslogtreecommitdiffstats
path: root/apps/gallery/lib
diff options
context:
space:
mode:
authorBjoern Schiessle <schiessle@owncloud.com>2012-06-25 10:15:20 +0200
committerBjoern Schiessle <schiessle@owncloud.com>2012-06-25 10:15:20 +0200
commit9ee528bc74a924def23168cd2ef8ccbdcbc649c8 (patch)
tree9506c8b246f40bda80334b0e21077fc0d3652d9e /apps/gallery/lib
parent5ac4830e757eb07ff2ca993954f2c31bbe80185f (diff)
downloadnextcloud-server-9ee528bc74a924def23168cd2ef8ccbdcbc649c8.tar.gz
nextcloud-server-9ee528bc74a924def23168cd2ef8ccbdcbc649c8.zip
Only delete existing thumbnails (bug #1100)
Diffstat (limited to 'apps/gallery/lib')
-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() {}