Skip to content

Commit 9261b2b

Browse files
committed
fix(NextcloudBookmarks): Make sure lock is freed when forceLock is set
fixes #1862 Signed-off-by: Marcel Klehr <[email protected]>
1 parent 7dcc7c8 commit 9261b2b

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/lib/adapters/NextcloudBookmarks.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,9 @@ export default class NextcloudBookmarksAdapter implements Adapter, BulkImportRes
158158

159159
// if needLock -- we always need it
160160
this.locked = await this.acquireLock()
161-
if (!forceLock && !this.locked) {
161+
if (forceLock) {
162+
this.locked = true
163+
} else if (!this.locked) {
162164
throw new ResourceLockedError()
163165
}
164166
this.lockingInterval = setInterval(() => !this.ended && this.acquireLock(), LOCK_INTERVAL)

0 commit comments

Comments
 (0)