mirror of
https://github.com/nextcloud/server.git
synced 2026-06-11 09:42:09 -04:00
fix: make locked exception path relative to the view
Signed-off-by: Robin Appelman <robin@icewind.nl>
This commit is contained in:
parent
d7b1ecb881
commit
33fb176651
1 changed files with 8 additions and 16 deletions
|
|
@ -2038,9 +2038,9 @@ class View {
|
|||
);
|
||||
}
|
||||
} catch (LockedException $e) {
|
||||
// rethrow with the a human-readable path
|
||||
// rethrow with the human-readable path
|
||||
throw new LockedException(
|
||||
$this->getPathRelativeToFiles($absolutePath),
|
||||
$path,
|
||||
$e,
|
||||
$e->getExistingLock()
|
||||
);
|
||||
|
|
@ -2078,20 +2078,12 @@ class View {
|
|||
);
|
||||
}
|
||||
} catch (LockedException $e) {
|
||||
try {
|
||||
// rethrow with the a human-readable path
|
||||
throw new LockedException(
|
||||
$this->getPathRelativeToFiles($absolutePath),
|
||||
$e,
|
||||
$e->getExistingLock()
|
||||
);
|
||||
} catch (\InvalidArgumentException $ex) {
|
||||
throw new LockedException(
|
||||
$absolutePath,
|
||||
$ex,
|
||||
$e->getExistingLock()
|
||||
);
|
||||
}
|
||||
// rethrow with the a human-readable path
|
||||
throw new LockedException(
|
||||
$path,
|
||||
$e,
|
||||
$e->getExistingLock()
|
||||
);
|
||||
}
|
||||
|
||||
return true;
|
||||
|
|
|
|||
Loading…
Reference in a new issue