Merge pull request #14690 from nextcloud/dav-rename-hande-failure

throw a proper error if rename fails in dav
This commit is contained in:
Morris Jobke 2019-03-14 20:28:17 +01:00 committed by GitHub
commit 06c898cab4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -138,7 +138,9 @@ abstract class Node implements \Sabre\DAV\INode {
$newPath = $parentPath . '/' . $newName;
$this->fileView->rename($this->path, $newPath);
if (!$this->fileView->rename($this->path, $newPath)) {
throw new \Sabre\DAV\Exception('Failed to rename '. $this->path . ' to ' . $newPath);
}
$this->path = $newPath;