Skip to content

Commit

Permalink
Merge pull request #14690 from nextcloud/dav-rename-hande-failure
Browse files Browse the repository at this point in the history
throw a proper error if rename fails in dav
  • Loading branch information
MorrisJobke authored Mar 14, 2019
2 parents c7dd079 + dafbb42 commit 06c898c
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 @@ -138,7 +138,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 06c898c

Please sign in to comment.