adding file_exists check just to be on the save side
This commit is contained in:
parent
e55f25b64d
commit
6c5466a540
|
@ -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();
|
||||
|
|
Loading…
Reference in New Issue