mirror of
https://github.com/nextcloud/server.git
synced 2026-02-15 16:59:47 -05:00
Only delete existing thumbnails (bug #1100)
This commit is contained in:
parent
5ac4830e75
commit
9ee528bc74
1 changed files with 4 additions and 1 deletions
|
|
@ -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() {}
|
||||
|
|
|
|||
Loading…
Reference in a new issue