Skip to content

Commit

Permalink
Fixing "Directory Missing" Bug
Browse files Browse the repository at this point in the history
Fixing bug where directories will not be found. fixes #4
  • Loading branch information
Superschnizel committed Oct 25, 2023
1 parent ffc5ad4 commit 28162a5
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -151,9 +151,9 @@ export default class Moviegrabber extends Plugin {

dir.replace(/(^[/\s]+)|([/\s]+$)/g, ''); // clean up

var dir = dir != '' ? `/${dir}/` : '';
var dir = dir != '' ? `/${dir.replace(/\/$/, "")}/` : '';

if (!(await this.app.vault.adapter.exists('dir'))) {
if (!(await this.app.vault.adapter.exists(dir))) {
var n = new Notice(`Folder for ${type}: ${dir} does not exist!`)
n.noticeEl.addClass("notice_error")
return;
Expand Down
2 changes: 1 addition & 1 deletion manifest.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"id": "moviegrabber",
"name": "Moviegrabber",
"version": "1.1.0",
"version": "1.1.1",
"minAppVersion": "0.15.0",
"description": "Grab movie data from public APIs and transform it into notes that can be used with dataview and properties",
"author": "Superschnizel",
Expand Down

0 comments on commit 28162a5

Please sign in to comment.