summaryrefslogtreecommitdiffstats
path: root/lib/private/connector/sabre/file.php
diff options
context:
space:
mode:
authorVincent Petry <pvince81@owncloud.com>2014-01-08 18:43:20 +0100
committerVincent Petry <pvince81@owncloud.com>2014-01-08 18:43:20 +0100
commit8eaa39f4e2fb7bb1036aca5727db320de00960e2 (patch)
tree0cac2007800b1101d51eed0bb583a55ba670f642 /lib/private/connector/sabre/file.php
parentbb443ae937bdbc9f50c352d34abeaa0eaa3fa890 (diff)
downloadnextcloud-server-8eaa39f4e2fb7bb1036aca5727db320de00960e2.tar.gz
nextcloud-server-8eaa39f4e2fb7bb1036aca5727db320de00960e2.zip
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.
Diffstat (limited to 'lib/private/connector/sabre/file.php')
-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();
}