aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorJulius Härtl <jus@bitgrid.net>2023-03-28 13:19:05 +0200
committerJulius Härtl <jus@bitgrid.net>2023-05-02 19:40:27 +0200
commit11c5bc6a2ac1f9febce3c9e7183e5a444d490d52 (patch)
tree4a08bd824464a76fb147d0eb9200b85eabccebec /lib
parentc995428431c5b1a6b593cd960d63a25d027b9039 (diff)
downloadnextcloud-server-11c5bc6a2ac1f9febce3c9e7183e5a444d490d52.tar.gz
nextcloud-server-11c5bc6a2ac1f9febce3c9e7183e5a444d490d52.zip
fix: Wrap filesystem LockedExceptions for holding the readable path
Signed-off-by: Julius Härtl <jus@bitgrid.net>
Diffstat (limited to 'lib')
-rw-r--r--lib/private/Files/Storage/Common.php3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/private/Files/Storage/Common.php b/lib/private/Files/Storage/Common.php
index abbcf4ea433..cd9a05a2a1d 100644
--- a/lib/private/Files/Storage/Common.php
+++ b/lib/private/Files/Storage/Common.php
@@ -764,6 +764,7 @@ abstract class Common implements Storage, ILockingStorage, IWriteStreamStorage {
try {
$provider->acquireLock('files/' . md5($this->getId() . '::' . trim($path, '/')), $type, $this->getId() . '::' . $path);
} catch (LockedException $e) {
+ $e = new LockedException($e->getPath(), $e, $e->getExistingLock(), $path);
if ($logger) {
$logger->info($e->getMessage(), ['exception' => $e]);
}
@@ -796,6 +797,7 @@ abstract class Common implements Storage, ILockingStorage, IWriteStreamStorage {
try {
$provider->releaseLock('files/' . md5($this->getId() . '::' . trim($path, '/')), $type);
} catch (LockedException $e) {
+ $e = new LockedException($e->getPath(), $e, $e->getExistingLock(), $path);
if ($logger) {
$logger->info($e->getMessage(), ['exception' => $e]);
}
@@ -828,6 +830,7 @@ abstract class Common implements Storage, ILockingStorage, IWriteStreamStorage {
try {
$provider->changeLock('files/' . md5($this->getId() . '::' . trim($path, '/')), $type);
} catch (LockedException $e) {
+ $e = new LockedException($e->getPath(), $e, $e->getExistingLock(), $path);
if ($logger) {
$logger->info($e->getMessage(), ['exception' => $e]);
}