czottmann / obsidian-actions-uri

A plugin for Obsidian (https://obsidian.md) that adds additional `x-callback-url` endpoints to the app for common actions — it's a clean, super-charged addition to Obsidian URI.
https://zottmann.dev/obsidian-actions-uri/
MIT License
139 stars 6 forks source link

[ZCO-125] Trailing space in path prevents note from being created #54

Closed ekamil closed 1 year ago

ekamil commented 1 year ago

Given: the new folder doesn't exist - needs to be created

When: I use note/create with a file in folder that contains a trailing space: Test space /Test Note

Then: Nothing happens. Running this action from Shortcuts' Open x-callback the action just hangs there. Running with open doesn't hang, but also doesn't work.

Obsidian's dev console says:

Uncaught (in promise) Error: ENOENT: no such file or directory, open '/Users/kamil/Library/Mobile Documents/iCloud~md~obsidian/Documents/KeepTrack/Test space /Test Note.md'
await (async)
t @ app.js:1
(anonymous) @ VM190:1
(anonymous) @ node:electron/js2c/renderer_init:93
(anonymous) @ node:electron/js2c/renderer_init:81
emit @ node:events:527
onMessage @ node:electron/js2c/renderer_init:69

ZCO-125

czottmann commented 1 year ago

@ekamil Thanks for the report! Will be fixed in the next release. Can't give you an ETA yet, but I hope to get around to it soon!

czottmann commented 1 year ago

@ekamil Fix will go live with the upcoming v0.17!

Update: Released.