Skip to content

Commit 06c978d

Browse files
committed
chore(cleanup): redundant check for lock provider
We handle the NoLockProviderException gracefully anyway. Signed-off-by: Max <max@nextcloud.com>
1 parent d297911 commit 06c978d

1 file changed

Lines changed: 0 additions & 8 deletions

File tree

lib/Service/LockService.php

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -52,10 +52,6 @@ public function getLockByOthers(File $file): ?ILock {
5252
}
5353

5454
public function lock(File $file): bool {
55-
if (!$this->lockManager->isLockProviderAvailable()) {
56-
return true;
57-
}
58-
5955
try {
6056
$this->lockManager->lock(new LockContext(
6157
$file,
@@ -70,10 +66,6 @@ public function lock(File $file): bool {
7066
}
7167

7268
public function unlock(File $file): void {
73-
if (!$this->lockManager->isLockProviderAvailable()) {
74-
return;
75-
}
76-
7769
try {
7870
$this->lockManager->unlock(new LockContext(
7971
$file,

0 commit comments

Comments
 (0)