mirror of
https://github.com/nextcloud/server.git
synced 2026-06-12 18:21:40 -04:00
throw a proper error if rename fails in dav
Signed-off-by: Robin Appelman <robin@icewind.nl>
This commit is contained in:
parent
92634ec842
commit
19a3ac67a7
1 changed files with 3 additions and 1 deletions
|
|
@ -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 a new issue