generated from ztimson/template
Fix delete locks
This commit is contained in:
@@ -142,6 +142,7 @@ export class ZimManager {
|
||||
const match = local.find(l => l.name === nameOrFile || l.href === nameOrFile);
|
||||
if (!match) throw new Error(`ZIM not found locally: ${nameOrFile}`);
|
||||
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 this.#ensureServer();
|
||||
await this.#waitUntilVisible(file, {expect: false});
|
||||
|
||||
Reference in New Issue
Block a user