summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorVincent Petry <pvince81@owncloud.com>2014-01-09 06:16:43 -0800
committerVincent Petry <pvince81@owncloud.com>2014-01-09 06:16:43 -0800
commitb24c21b00f0116e8749f37646cc25f798992bf05 (patch)
treee5338ef4d664f3463a9aa18d6a5f7ef59d657a02 /lib
parente0dbc1b67e00703ff90e643fb70f4e9e631825be (diff)
parent8eaa39f4e2fb7bb1036aca5727db320de00960e2 (diff)
downloadnextcloud-server-b24c21b00f0116e8749f37646cc25f798992bf05.tar.gz
nextcloud-server-b24c21b00f0116e8749f37646cc25f798992bf05.zip
Merge pull request #6687 from owncloud/sharing-fixpartfilehandling
Removed special handling of part files in shared storage rename
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 53524ec9e54..c3b59007295 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();
}