diff --git a/src/core/tree-focus.ts b/src/core/tree-focus.ts index 02d52f2..9dde95b 100644 --- a/src/core/tree-focus.ts +++ b/src/core/tree-focus.ts @@ -167,19 +167,8 @@ export class TreeFocus { */ private async performPluginCleanupTask(): Promise { - const allItemPaths: string[] = []; - let fileExplorers = this.getFileExplorers(); - - for (let fiExplorer of fileExplorers) - { - FileExplorerHelper.forEveryItem(fiExplorer, (path, item) => - { - allItemPaths.push(path); - }); - } - const availableExplicitPaths = [...PluginSettings.getExplicitModePaths()]; - const orphanedExplicitPaths = availableExplicitPaths.filter((path) => allItemPaths.includes(path) === false); + const orphanedExplicitPaths = availableExplicitPaths.filter((path) => this.app.vault.getAbstractFileByPath(path) === null); Log.debug('orphaned explicit paths', orphanedExplicitPaths); @@ -333,4 +322,3 @@ export class TreeFocus { } -