Fix books dir migration

This commit is contained in:
chrox
2024-11-02 16:28:40 +01:00
parent b0ab0825e8
commit e0f468e30c
@@ -213,6 +213,7 @@ export abstract class BaseAppService implements AppService {
const txt = await this.fs.readFile(libraryFilename, 'Books', 'text');
books = JSON.parse(txt as string);
} catch {
await this.fs.createDir('', 'Books', true);
await this.fs.writeFile(libraryFilename, 'Books', '[]');
}