Skip to content

Commit

Permalink
Fix getFolder ask for folder filter set
Browse files Browse the repository at this point in the history
  • Loading branch information
Balibaloo committed Mar 28, 2024
1 parent 6aa02d2 commit c5ffbb7
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion src/main.ts
Expand Up @@ -104,7 +104,16 @@ export default class FnOPlugin extends Plugin {
id: 'pick-folder',
name: 'Pick folder',
callback: async () => {
const folder = await this.getFolder();
if (this.settings.folderFilterSets.length == 0){
new Notice("Error: no folder filter sets defined");
return;
}

const folderFilterSet = this.settings.folderFilterSets.length === 1
? this.settings.folderFilterSets[0]
: await choseFilterSet(this.settings.folderFilterSets)

const folder = await this.getFolder(undefined, undefined, undefined, folderFilterSet);
console.log(folder);
},
});
Expand Down

0 comments on commit c5ffbb7

Please sign in to comment.