summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorJoas Schilling <coding@schilljs.com>2017-08-10 11:58:01 +0200
committerJoas Schilling <coding@schilljs.com>2017-08-10 11:58:01 +0200
commit5515c7b2c0fd349a3c9bda680030b126ba223b61 (patch)
treeb60ab9e80627ea3e2ed722a412ad93218cd68246 /lib
parent073216e8278983abef6ac51d6e0a900f95af0024 (diff)
downloadnextcloud-server-5515c7b2c0fd349a3c9bda680030b126ba223b61.tar.gz
nextcloud-server-5515c7b2c0fd349a3c9bda680030b126ba223b61.zip
Still throw a locked exception when the path is not relative to $user/files/
Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'lib')
-rw-r--r--lib/private/Files/View.php17
1 files changed, 12 insertions, 5 deletions
diff --git a/lib/private/Files/View.php b/lib/private/Files/View.php
index 71b453d299a..3fe6d43ca31 100644
--- a/lib/private/Files/View.php
+++ b/lib/private/Files/View.php
@@ -1941,11 +1941,18 @@ class View {
);
}
} catch (\OCP\Lock\LockedException $e) {
- // rethrow with the a human-readable path
- throw new \OCP\Lock\LockedException(
- $this->getPathRelativeToFiles($absolutePath),
- $e
- );
+ try {
+ // rethrow with the a human-readable path
+ throw new \OCP\Lock\LockedException(
+ $this->getPathRelativeToFiles($absolutePath),
+ $e
+ );
+ } catch (\InvalidArgumentException $e) {
+ throw new \OCP\Lock\LockedException(
+ $absolutePath,
+ $e
+ );
+ }
}
}