aboutsummaryrefslogtreecommitdiffstats
path: root/lib/public/Lock
diff options
context:
space:
mode:
authorRobin Appelman <robin@icewind.nl>2025-04-25 18:35:12 +0200
committerRobin Appelman <robin@icewind.nl>2025-04-25 18:40:03 +0200
commitbb4cf2830aca984c001542b3cdc2ebc78bba6941 (patch)
treeae68a2574ea38a2b833be627df600c1f14096681 /lib/public/Lock
parent5f40fad790a16f9613e796728c23f47e80bcb6ee (diff)
downloadnextcloud-server-scan-locked-error.tar.gz
nextcloud-server-scan-locked-error.zip
fix: better error message when trying to scan a folder that is already being scannedscan-locked-error
Signed-off-by: Robin Appelman <robin@icewind.nl>
Diffstat (limited to 'lib/public/Lock')
-rw-r--r--lib/public/Lock/LockedException.php12
1 files changed, 12 insertions, 0 deletions
diff --git a/lib/public/Lock/LockedException.php b/lib/public/Lock/LockedException.php
index ce41d2d7242..799886a2dbb 100644
--- a/lib/public/Lock/LockedException.php
+++ b/lib/public/Lock/LockedException.php
@@ -24,6 +24,8 @@ class LockedException extends \Exception {
/** @var string|null */
private $existingLock;
+ private ?string $readablePath;
+
/**
* LockedException constructor.
*
@@ -34,6 +36,7 @@ class LockedException extends \Exception {
* @since 8.1.0
*/
public function __construct(string $path, ?\Exception $previous = null, ?string $existingLock = null, ?string $readablePath = null) {
+ $this->readablePath = $readablePath;
if ($readablePath) {
$message = "\"$path\"(\"$readablePath\") is locked";
} else {
@@ -62,4 +65,13 @@ class LockedException extends \Exception {
public function getExistingLock(): ?string {
return $this->existingLock;
}
+
+ /**
+ * @return ?string
+ * @since 32.0.0
+ */
+ public function getReadablePath(): ?string {
+ return $this->readablePath;
+ }
+
}