Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorVincent Petry <pvince81@owncloud.com>2014-01-08 21:43:20 +0400
committerVincent Petry <pvince81@owncloud.com>2014-01-09 18:23:55 +0400
commita711d4e39ab87cefdea3fbe128ba1e256aba15d5 (patch)
tree5f806735c59a8518510528fffcb802e5eacca3f9 /lib
parent52dc90d5fd99063dc67fe0e44208617e73cb05a0 (diff)
Removed special handling of part files in shared storage rename
This fixes the issue introduced by the transfer id which itself wasn't taken into account by the shortcut code for part file in the shared storage class. Backport of 8eaa39f to stable6
Diffstat (limited to 'lib')
-rw-r--r--lib/private/connector/sabre/file.php5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/private/connector/sabre/file.php b/lib/private/connector/sabre/file.php
index 295575f0af6..ab77d0a48a2 100644
--- a/lib/private/connector/sabre/file.php
+++ b/lib/private/connector/sabre/file.php
@@ -242,7 +242,10 @@ class OC_Connector_Sabre_File extends OC_Connector_Sabre_Node implements Sabre_D
$fileExists = $fs->file_exists($targetPath);
if ($renameOkay === false || $fileExists === false) {
\OC_Log::write('webdav', '\OC\Files\Filesystem::rename() failed', \OC_Log::ERROR);
- $fs->unlink($targetPath);
+ // only delete if an error occurred and the target file was already created
+ if ($fileExists) {
+ $fs->unlink($targetPath);
+ }
throw new Sabre_DAV_Exception();
}