Skip to content

Commit

Permalink
Merge pull request #14700 from nextcloud/backport/14690/stable15
Browse files Browse the repository at this point in the history
[stable15] throw a proper error if rename fails in dav
  • Loading branch information
MorrisJobke authored Mar 15, 2019
2 parents 7cf35f4 + 19a3ac6 commit b42e4b1
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 b42e4b1

Please sign in to comment.