aboutsummaryrefslogtreecommitdiffstats
path: root/lib/connector/sabre
diff options
context:
space:
mode:
authorThomas Müller <thomas.mueller@tmit.eu>2013-09-24 13:53:32 +0200
committerThomas Müller <thomas.mueller@tmit.eu>2013-09-24 13:53:32 +0200
commit6c5466a540340a22e487d71a2605dcda3498a658 (patch)
treecbb4d8c90cb5fd1055c52e4739895e6c6c62238f /lib/connector/sabre
parente55f25b64df09a3ba6535274eaf738e82910e1f6 (diff)
downloadnextcloud-server-6c5466a540340a22e487d71a2605dcda3498a658.tar.gz
nextcloud-server-6c5466a540340a22e487d71a2605dcda3498a658.zip
adding file_exists check just to be on the save side
Diffstat (limited to 'lib/connector/sabre')
-rw-r--r--lib/connector/sabre/directory.php3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/connector/sabre/directory.php b/lib/connector/sabre/directory.php
index 9e0fe5e64e7..a50098df793 100644
--- a/lib/connector/sabre/directory.php
+++ b/lib/connector/sabre/directory.php
@@ -89,7 +89,8 @@ class OC_Connector_Sabre_Directory extends OC_Connector_Sabre_Node implements Sa
// rename to correct path
$renameOkay = \OC\Files\Filesystem::rename($partpath, $newPath);
- if (!$renameOkay) {
+ $fileExists = \OC\Files\Filesystem::file_exists($newPath);
+ if ($renameOkay === false || $fileExists === false) {
\OC_Log::write('webdav', '\OC\Files\Filesystem::rename() failed', \OC_Log::ERROR);
\OC\Files\Filesystem::unlink($partpath);
throw new Sabre_DAV_Exception();