From 1deb6aadd305d9c211d5cd640cfa7780119d644c Mon Sep 17 00:00:00 2001 From: Robin Appelman Date: Wed, 6 Aug 2014 12:06:41 +0200 Subject: return null instead of throwing an exception --- lib/private/files/node/folder.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'lib/private/files/node/folder.php') diff --git a/lib/private/files/node/folder.php b/lib/private/files/node/folder.php index f5211d5d748..8c7acc339ae 100644 --- a/lib/private/files/node/folder.php +++ b/lib/private/files/node/folder.php @@ -27,7 +27,6 @@ class Folder extends Node implements \OCP\Files\Folder { /** * @param string $path - * @throws \OCP\Files\NotFoundException * @return string */ public function getRelativePath($path) { @@ -37,7 +36,7 @@ class Folder extends Node implements \OCP\Files\Folder { if ($path === $this->path) { return '/'; } else if (strpos($path, $this->path . '/') !== 0) { - throw new NotFoundException(); + return null; } else { $path = substr($path, strlen($this->path)); return $this->normalizePath($path); -- cgit v1.2.3