瀏覽代碼

throw a proper error if rename fails in dav

Signed-off-by: Robin Appelman <robin@icewind.nl>
tags/v16.0.0beta1
Robin Appelman 5 年之前
父節點
當前提交
dafbb42189
No account linked to committer's email address
共有 1 個文件被更改,包括 3 次插入1 次删除
  1. 3
    1
      apps/dav/lib/Connector/Sabre/Node.php

+ 3
- 1
apps/dav/lib/Connector/Sabre/Node.php 查看文件

@@ -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…
取消
儲存