Skip to content

Commit

Permalink
Fix LockedFS.unlock operations ordering
Browse files Browse the repository at this point in the history
  • Loading branch information
james-pre committed Sep 6, 2024
1 parent 39c8597 commit e387889
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/backends/locked.ts
Original file line number Diff line number Diff line change
Expand Up @@ -84,8 +84,9 @@ export class LockedFS<FS extends FileSystem> implements FileSystem {
}

// Non-null assertion: we already checked locks has path
this.locks.get(path)!.resolve();
const lock = this.locks.get(path)!;
this.locks.delete(path);
lock.resolve();
return true;
}

Expand Down

0 comments on commit e387889

Please sign in to comment.