Still throw a locked exception when the path is not relative to $user/files/

Signed-off-by: Joas Schilling <coding@schilljs.com>
This commit is contained in:
Joas Schilling 2017-08-10 11:58:01 +02:00
parent 073216e827
commit 5515c7b2c0
No known key found for this signature in database
GPG Key ID: E166FD8976B3BAC8
1 changed files with 12 additions and 5 deletions

View File

@ -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
);
}
}
}