Fix delete locks
Publish Library / Build NPM Project (push) Successful in 52s
Publish Library / Tag Version (push) Successful in 6s

This commit is contained in:
2026-10-05 19:29:47 -04:00
parent a1aa158264
commit 36f954bb6b
2 changed files with 2 additions and 1 deletions
+1 -1
View File
@@ -1,6 +1,6 @@
{ {
"name": "@ztimson/zim-utils", "name": "@ztimson/zim-utils",
"version": "0.4.10", "version": "0.4.11",
"description": "Native, dependency-light ZIM archive reader/searcher and Kiwix catalog downloader for Node.js", "description": "Native, dependency-light ZIM archive reader/searcher and Kiwix catalog downloader for Node.js",
"author": "Zak Timson", "author": "Zak Timson",
"license": "MIT", "license": "MIT",
+1
View File
@@ -142,6 +142,7 @@ export class ZimManager {
const match = local.find(l => l.name === nameOrFile || l.href === nameOrFile); const match = local.find(l => l.name === nameOrFile || l.href === nameOrFile);
if (!match) throw new Error(`ZIM not found locally: ${nameOrFile}`); if (!match) throw new Error(`ZIM not found locally: ${nameOrFile}`);
const file = match.href + (match.href.endsWith('.zim') ? '' : '.zim'); const file = match.href + (match.href.endsWith('.zim') ? '' : '.zim');
await this.#server.stop();
await fs.promises.rm(path.join(this.#dir, file), {force: true}); await fs.promises.rm(path.join(this.#dir, file), {force: true});
await this.#ensureServer(); await this.#ensureServer();
await this.#waitUntilVisible(file, {expect: false}); await this.#waitUntilVisible(file, {expect: false});