diff options
author | Robin Appelman <robin@icewind.nl> | 2025-01-28 20:25:28 +0100 |
---|---|---|
committer | Daniel Kesselberg <mail@danielkesselberg.de> | 2025-02-11 14:38:27 +0100 |
commit | 9e1ae74a1c862e223185cd516866a1469b989106 (patch) | |
tree | 6361f1e54f3b2a5d4c8ffc578a43cff06a4b439a /lib | |
parent | 99ae669e39874dff6eb84b38661b77fbf8cbbaec (diff) | |
download | nextcloud-server-9e1ae74a1c862e223185cd516866a1469b989106.tar.gz nextcloud-server-9e1ae74a1c862e223185cd516866a1469b989106.zip |
fix: make locked exception path relative to the view
Signed-off-by: Robin Appelman <robin@icewind.nl>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/private/Files/View.php | 24 |
1 files changed, 8 insertions, 16 deletions
diff --git a/lib/private/Files/View.php b/lib/private/Files/View.php index 5e09ce69fb2..fea1f64707b 100644 --- a/lib/private/Files/View.php +++ b/lib/private/Files/View.php @@ -2062,9 +2062,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() ); @@ -2102,20 +2102,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; |