mirror of
https://github.com/nextcloud/server.git
synced 2026-06-09 00:32:29 -04:00
Merge pull request #16943 from owncloud/sabre-convertinvalidpath
Convert invalid path exception to sabre exception on MOVE
This commit is contained in:
commit
60005bea19
2 changed files with 6 additions and 2 deletions
|
|
@ -106,7 +106,11 @@ class ObjectTree extends \Sabre\DAV\Tree {
|
|||
|
||||
$path = trim($path, '/');
|
||||
if ($path) {
|
||||
$this->fileView->verifyPath($path, basename($path));
|
||||
try {
|
||||
$this->fileView->verifyPath($path, basename($path));
|
||||
} catch (\OCP\Files\InvalidPathException $ex) {
|
||||
throw new InvalidPath($ex->getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
if (isset($this->cache[$path])) {
|
||||
|
|
|
|||
|
|
@ -239,7 +239,7 @@ class ObjectTree extends \Test\TestCase {
|
|||
}
|
||||
|
||||
/**
|
||||
* @expectedException \OCP\Files\InvalidPathException
|
||||
* @expectedException \OC\Connector\Sabre\Exception\InvalidPath
|
||||
*/
|
||||
public function testGetNodeForPathInvalidPath() {
|
||||
$path = '/foo\bar';
|
||||
|
|
|
|||
Loading…
Reference in a new issue