aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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();