Merge pull request #14701 from nextcloud/backport/14690/stable14

[stable14] throw a proper error if rename fails in dav
This commit is contained in:
Morris Jobke 2019-03-15 10:53:33 +01:00 committed by GitHub
commit 929c2e2513
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 1 deletions

View File

@ -136,7 +136,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;