summaryrefslogtreecommitdiffstats
path: root/apps/files_trashbin
diff options
context:
space:
mode:
authorRobin Appelman <icewind@owncloud.com>2015-01-29 15:52:40 +0100
committerRobin Appelman <icewind@owncloud.com>2015-01-29 15:52:40 +0100
commitce0aa02aacee6b4e2641bdb1666f5650507ed28a (patch)
tree207ef2232fa66c9cfcdbfc0617c0249c4c031619 /apps/files_trashbin
parent215388f4e06ab229ffaccc052f8d2b07faa45892 (diff)
downloadnextcloud-server-ce0aa02aacee6b4e2641bdb1666f5650507ed28a.tar.gz
nextcloud-server-ce0aa02aacee6b4e2641bdb1666f5650507ed28a.zip
Dont do a cache rename if we cant delete the source file
Diffstat (limited to 'apps/files_trashbin')
-rw-r--r--apps/files_trashbin/lib/storage.php4
1 files changed, 3 insertions, 1 deletions
diff --git a/apps/files_trashbin/lib/storage.php b/apps/files_trashbin/lib/storage.php
index 019fd490b52..175889ef95d 100644
--- a/apps/files_trashbin/lib/storage.php
+++ b/apps/files_trashbin/lib/storage.php
@@ -80,7 +80,9 @@ class Storage extends Wrapper {
$result = \OCA\Files_Trashbin\Trashbin::move2trash($filesPath);
// in cross-storage cases the file will be copied
// but not deleted, so we delete it here
- $this->storage->unlink($path);
+ if ($result) {
+ $this->storage->unlink($path);
+ }
} else {
$result = $this->storage->unlink($path);
}