Feel-ix-343 / markdown-oxide

Editor Agnostic PKM: you bring the text editor and we bring the PKM - inspired by and compatible with Obsidian
GNU General Public License v3.0
688 stars 10 forks source link

Permission denied trying to create files in a Google Drive folder #47

Closed rafaelss closed 2 months ago

rafaelss commented 2 months ago

I'm getting this error when using the code action to create new files

image

2024-04-17T15:41:35-03:00 [INFO] starting language server "markdown-oxide", path: "/Users/[REDACTED]/Library/CloudStorage/GoogleDrive-[REDACTED]/My Drive/Notes", id: 28
2024-04-17T15:41:35-03:00 [INFO] starting language server. binary path: "/Users/[REDACTED]/Library/Application Support/Zed/extensions/work/markdown-oxide/markdown-oxide-v0.0.16/markdown-oxide-v0.0.16-aarch64-apple-darwin/markdown-oxide", working directory: "/Users/[REDACTED]/Library/CloudStorage/GoogleDrive-[REDACTED]/My Drive/Notes", args: []
2024-04-17T15:41:41-03:00 [ERROR] crates/editor/src/element.rs:324: Permission denied (os error 13)
Feel-ix-343 commented 2 months ago

Thanks for reporting!

This would be a Zed issue; On requesting the code action, the server returns a create file lsp response. The text editor is then responsible for creating the file.

Can you create files normally in Zed?

rafaelss commented 2 months ago

yeah, creating files using New File menu is working normally

image

perhaps it's related to this: https://github.com/zed-industries/zed/issues/5138

I tried it now creating files in the Desktop folder, and after zed asked for permissions and have it, the files were created normally as well

anyways, I'll create my folder somewhere else and make google drive sync it (instead of use the folder directly from the google drive directory)

Feel-ix-343 commented 2 months ago

I guessing Zed is using a macOS operating system api to create new files through the context menu, and a different API for the LSP. I would have to check the source to figure out for sure.

I hope your work around works!

Is there any other comments you have on the language server running in Zed?

Feel-ix-343 commented 2 months ago

Also if your workaround works I'll close the issue