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

handle error situation of rename proper

parent 5d671a84
Branches
No related tags found
No related merge requests found
......@@ -88,7 +88,12 @@ class OC_Connector_Sabre_Directory extends OC_Connector_Sabre_Node implements Sa
}
// rename to correct path
\OC\Files\Filesystem::rename($partpath, $newPath);
$renameOkay = \OC\Files\Filesystem::rename($partpath, $newPath);
if (!$renameOkay) {
\OC_Log::write('webdav', '\OC\Files\Filesystem::rename() failed', \OC_Log::ERROR);
\OC\Files\Filesystem::unlink($partpath);
throw new Sabre_DAV_Exception();
}
// allow sync clients to send the mtime along in a header
$mtime = OC_Request::hasModificationTime();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment