diff options
author | Vincent Petry <pvince81@owncloud.com> | 2014-01-09 06:16:43 -0800 |
---|---|---|
committer | Vincent Petry <pvince81@owncloud.com> | 2014-01-09 06:16:43 -0800 |
commit | b24c21b00f0116e8749f37646cc25f798992bf05 (patch) | |
tree | e5338ef4d664f3463a9aa18d6a5f7ef59d657a02 /lib | |
parent | e0dbc1b67e00703ff90e643fb70f4e9e631825be (diff) | |
parent | 8eaa39f4e2fb7bb1036aca5727db320de00960e2 (diff) | |
download | nextcloud-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.php | 5 |
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(); } |