summaryrefslogtreecommitdiffstats
path: root/lib/private/files
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 /lib/private/files
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 'lib/private/files')
-rw-r--r--lib/private/files/view.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/private/files/view.php b/lib/private/files/view.php
index 5ed7af9222c..6c720a6f5c0 100644
--- a/lib/private/files/view.php
+++ b/lib/private/files/view.php
@@ -527,7 +527,7 @@ class View {
fclose($target);
if ($result !== false) {
- $storage1->unlink($internalPath1);
+ $result &= $storage1->unlink($internalPath1);
}
}
}
@@ -537,7 +537,7 @@ class View {
if ($this->shouldEmitHooks()) {
$this->emit_file_hooks_post($exists, $path2);
}
- } elseif ($result !== false) {
+ } elseif ($result) {
$this->updater->rename($path1, $path2);
if ($this->shouldEmitHooks($path1) and $this->shouldEmitHooks($path2)) {
\OC_Hook::emit(