Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Folder already exists on second "Slurp" #10

Closed
Geffreyvanderbos opened this issue Apr 22, 2024 · 2 comments
Closed

Folder already exists on second "Slurp" #10

Geffreyvanderbos opened this issue Apr 22, 2024 · 2 comments

Comments

@Geffreyvanderbos
Copy link

Geffreyvanderbos commented Apr 22, 2024

Description
An error occurs when trying to "Slurp" to a custom path in the app. The first attempt to create the folder works, but subsequent attempts result in an "Uncaught (in promise) Error: Folder already exists." error.

Operating System:
Windows

Steps to Reproduce:

  1. Open Obsidian and Slurp settings.
  2. Set Default Saved Location to "/Inbox/Slurped".
  3. 'Slurp' a website.
  4. Confirm that the folder and markdown file are created successfully.
  5. Attempt to do another 'slurp'.
  6. The error message appears.

Or

  1. Create the directory set in Default Saved Location manually.
  2. Try a 'slurp'.
  3. The error message appears.

Expected Behavior:
The application should add the second slurped webpage to the already existing path.

Error Message:
app.js:1 Uncaught (in promise) Error: Folder already exists.
at t. (app.js:1:736472)
at app.js:1:237056
at Object.next (app.js:1:237161)
at a (app.js:1:235879)

@inhumantsar
Copy link
Owner

hey thanks for the report! that's an odd one. i'm able to reproduce it on my end. looks like when getFolderByPath gets called that second time, Obsidian returns null instead of the directory.

it works for me after removing the leading slash (ie: Inbox/Slurped) though. can you give that a try and let me know if it works for you too?

it's just a workaround ofc, slurp shouldn't barf silently at the first sign of trouble, but it should get you back up and running while i put together a permanent fix.

@Geffreyvanderbos
Copy link
Author

Oh silly me. Yes, removing the leading slash works. Also, the update fixed everything I could throw at it. Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants