From d3287ca01421900fbddb96ac5e4073b5bed3e9ff Mon Sep 17 00:00:00 2001 From: tiddlygit-test Date: Mon, 14 Feb 2022 00:09:29 +0800 Subject: [PATCH] feat: speedup by not await fs unlink $__StoryList --- src/services/wiki/index.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/services/wiki/index.ts b/src/services/wiki/index.ts index abf3b5e4..ed04c6c9 100644 --- a/src/services/wiki/index.ts +++ b/src/services/wiki/index.ts @@ -483,8 +483,9 @@ export class Wiki implements IWikiService { const { wikiFolderLocation, port, isSubWiki, mainWikiToLink, id } = workspace; // remove $:/StoryList, otherwise it sometimes cause $__StoryList_1.tid to be generated + // and it will leak private sub-wiki's opened tiddler title try { - await fs.unlink(path.resolve(wikiFolderLocation, 'tiddlers', '$__StoryList')); + void fs.unlink(path.resolve(wikiFolderLocation, 'tiddlers', '$__StoryList')).catch(() => {}); } catch { // do nothing }