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

duplicate code :sigh: - will fix this in a second pr

parent 6c5466a5
No related branches found
No related tags found
No related merge requests found
......@@ -74,7 +74,14 @@ class OC_Connector_Sabre_File extends OC_Connector_Sabre_Node implements Sabre_D
}
// rename to correct path
\OC\Files\Filesystem::rename($partpath, $this->path);
$renameOkay = \OC\Files\Filesystem::rename($partpath, $this->path);
$fileExists = \OC\Files\Filesystem::file_exists($this->path);
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();
}
//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.
Finish editing this message first!
Please register or to comment