Merge pull request #14700 from nextcloud/backport/14690/stable15

[stable15] throw a proper error if rename fails in dav
This commit is contained in:
Morris Jobke 2019-03-15 10:53:40 +01:00 committed by GitHub
commit b42e4b19ee
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;