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 b7768ac11d
commit 9cae892974
No known key found for this signature in database
GPG Key ID: E166FD8976B3BAC8
1 changed files with 12 additions and 5 deletions

View File

@ -1950,11 +1950,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
);
}
}
}