Selaa lähdekoodia

Convert invalid path exception to sabre exception on MOVE

tags/v8.1RC2
Vincent Petry 9 vuotta sitten
vanhempi
commit
1f91e9e65d

+ 5
- 1
lib/private/connector/sabre/objecttree.php Näytä tiedosto

@@ -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])) {

+ 1
- 1
tests/lib/connector/sabre/objecttree.php Näytä tiedosto

@@ -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…
Peruuta
Tallenna