mirror of
https://github.com/nextcloud/server.git
synced 2026-04-23 07:08:34 -04:00
Merge pull request #14690 from nextcloud/dav-rename-hande-failure
throw a proper error if rename fails in dav
This commit is contained in:
commit
06c898cab4
1 changed files with 3 additions and 1 deletions
|
|
@ -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;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue