boltex / leojs

Leo Literate Editor with Outline in Typescript
https://boltex.github.io/leojs/
MIT License
28 stars 1 forks source link

File related functionality bugs: Force having an opened workspace, or support no workspace when running on desktop. #130

Closed boltex closed 4 months ago

boltex commented 5 months ago

When running on the web, an opened workspace is required for the filesystem to have a 'relative URI' to work from.

When running on desktop, this is not enforced and has many file related command and functionality fail. Either force an opened workspace or properly support not having a workspace opened.

Discovered by @tbpassin in https://github.com/boltex/scripting-samples-leojs/issues/4

boltex commented 4 months ago

I changed the somewhat faulty scripts in scripting-samples with this merge request: eafaa98d8c34660b9d46d3ad21a3477882e697d9

The g.makeVscodeUri method was available in order to create Uri pointing to arbitrary files in relation to the .leo file. (instead of in relation to the g.workspaceUri)