diff --git a/src/Commands.ts b/src/Commands.ts index f0654a1..b0f9e2a 100644 --- a/src/Commands.ts +++ b/src/Commands.ts @@ -251,7 +251,7 @@ export class Commands { } fileCommands() { - this.plugin.registerEvent(this.app.workspace.on('file-menu', async (menu: Menu, file: TAbstractFile) => { + this.plugin.registerEvent(this.app.workspace.on('file-menu', (menu: Menu, file: TAbstractFile) => { let folder: TAbstractFile | TFolder | null = file.parent; if (file instanceof TFile) { if (this.plugin.settings.storageLocation === 'insideFolder') { @@ -269,7 +269,7 @@ export class Commands { if (folder instanceof TFolder) { const folderNote = getFolderNote(this.plugin, folder.path); - const excludedFolder = await getExcludedFolder(this.plugin, folder.path, true); + const excludedFolder = getExcludedFolder(this.plugin, folder.path, true); if (folderNote?.path === file.path && !excludedFolder?.detached) { return; } } else if (file.parent instanceof TFolder) { folder = file.parent; diff --git a/src/ExcludeFolders/functions/folderFunctions.ts b/src/ExcludeFolders/functions/folderFunctions.ts index 91a1627..cc9e586 100644 --- a/src/ExcludeFolders/functions/folderFunctions.ts +++ b/src/ExcludeFolders/functions/folderFunctions.ts @@ -11,7 +11,7 @@ import { getWhitelistedFolder } from './whitelistFolderFunctions'; import { WhitelistedFolder } from '../WhitelistFolder'; import { WhitelistedPattern } from '../WhitelistPattern'; -export async function getExcludedFolder(plugin: FolderNotesPlugin, path: string, includeDetached: boolean, pathOnly?: boolean, ignoreWhitelist?: boolean) { +export function getExcludedFolder(plugin: FolderNotesPlugin, path: string, includeDetached: boolean, pathOnly?: boolean, ignoreWhitelist?: boolean) { let excludedFolder = {} as ExcludedFolder | ExcludePattern | undefined; const whitelistedFolder = getWhitelistedFolder(plugin, path) as WhitelistedFolder | WhitelistedPattern | undefined; const folderName = getFolderNameFromPathString(path);