Skip to content

Commit

Permalink
throw a proper error if rename fails in dav
Browse files Browse the repository at this point in the history
Signed-off-by: Robin Appelman <robin@icewind.nl>
  • Loading branch information
icewind1991 authored and Backportbot committed Mar 14, 2019
1 parent 92634ec commit 19a3ac6
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion apps/dav/lib/Connector/Sabre/Node.php
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,9 @@ public function setName($name) {

$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;

Expand Down

0 comments on commit 19a3ac6

Please sign in to comment.