Merge pull request #14700 from nextcloud/backport/14690/stable15
[stable15] throw a proper error if rename fails in dav
This commit is contained in:
commit
b42e4b19ee
|
@ -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;
|
||||
|
||||
|
|
Loading…
Reference in New Issue