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

Error message while creating a new Daily Note #164

Closed
d2s opened this issue Jul 26, 2020 · 1 comment
Closed

Error message while creating a new Daily Note #164

d2s opened this issue Jul 26, 2020 · 1 comment

Comments

@d2s
Copy link

d2s commented Jul 26, 2020

When running command Foam: Open Daily Note via VS Code command palette (on a Windows 10 machine), getting an error message with the following text:

Command 'Foam: Open Daily Note' resulted in an error (cannot open c:%5CUsers%5Cusername%5CDocuments%5Cnotes%5C2020-07-26.md. Detail: Unable to resolve resource c:%5CUsers%5Cusername%5CDocuments%5Cnotes%5C2020-07-26.md)

Issue seems to be that for some reason, the file path handling isn't working properly on a Windows machine. It is taking \ character and replacing it with %5C urlencoded character code.

File path urlencoded:

c:%5CUsers%5Cusername%5CDocuments%5Cnotes%5C2020-07-26.md

Working path would be (in this example):

c:\Users\username\Documents\notes\2020-07-26.md

Haven't looked at the Foam code to figure out what could be done to fix this. If someone who has a Windows machine could check if they get the same error message while trying to use the feature, it could help to verify if this is happening on a multiple computers.

Edit: File 2020-07-26.md got created, but it couldn't get opened automatically. So part of the code works.

Related to:

@jevakallio
Copy link
Collaborator

@d2s thanks for reporting this! It's already been reported as #160, so I'm going to close this as a duplicate and track the issue there.

Looks like a potential Windows issue. I don't have a Windows box available right now, but let me look through the source code and see if I can see anything suspicious!

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