mirror of
https://github.com/lostpaul/obsidian-folder-notes.git
synced 2026-07-22 07:40:24 +00:00
Fix #218
This commit is contained in:
parent
0739e10a8e
commit
219647482c
2 changed files with 3 additions and 3 deletions
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Reference in a new issue