[Pkg-owncloud-commits] [owncloud] 420/457: Convert invalid path exception to sabre exception on MOVE

David Prévot taffit at moszumanska.debian.org
Sun Jun 28 20:06:59 UTC 2015


This is an automated email from the git hooks/post-receive script.

taffit pushed a commit to branch stable8
in repository owncloud.

commit 1f91e9e65da2a3f029f403ac5f1b7114235383a8
Author: Vincent Petry <pvince81 at owncloud.com>
Date:   Mon Jun 15 17:49:11 2015 +0200

    Convert invalid path exception to sabre exception on MOVE
---
 lib/private/connector/sabre/objecttree.php | 6 +++++-
 tests/lib/connector/sabre/objecttree.php   | 2 +-
 2 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/lib/private/connector/sabre/objecttree.php b/lib/private/connector/sabre/objecttree.php
index a73c9a8..c96a745 100644
--- a/lib/private/connector/sabre/objecttree.php
+++ b/lib/private/connector/sabre/objecttree.php
@@ -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])) {
diff --git a/tests/lib/connector/sabre/objecttree.php b/tests/lib/connector/sabre/objecttree.php
index b9f8591..00aab94 100644
--- a/tests/lib/connector/sabre/objecttree.php
+++ b/tests/lib/connector/sabre/objecttree.php
@@ -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';

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-owncloud/owncloud.git



More information about the Pkg-owncloud-commits mailing list