Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix: make locked exception path relative to the view
Signed-off-by: Robin Appelman <[email protected]>
  • Loading branch information
icewind1991 authored and kesselb committed Feb 11, 2025
commit 9e1ae74a1c862e223185cd516866a1469b989106
24 changes: 8 additions & 16 deletions lib/private/Files/View.php
Original file line number Diff line number Diff line change
Expand Up @@ -2062,9 +2062,9 @@ private function lockPath($path, $type, $lockMountPoint = false) {
);
}
} 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()
);
Expand Down Expand Up @@ -2102,20 +2102,12 @@ public function changeLock($path, $type, $lockMountPoint = false) {
);
}
} 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;
Expand Down