adding file_exists check just to be on the save side

This commit is contained in:
Thomas Müller 2013-09-24 13:53:32 +02:00
parent e55f25b64d
commit 6c5466a540
1 changed files with 2 additions and 1 deletions

View File

@ -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();