Skip to content
Snippets Groups Projects
Commit 6c5466a5 authored by Thomas Müller's avatar Thomas Müller
Browse files

adding file_exists check just to be on the save side

parent e55f25b6
No related branches found
No related tags found
No related merge requests found
......@@ -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();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment