jstaf / onedriver

A native Linux filesystem for Microsoft OneDrive
GNU General Public License v3.0
1.96k stars 96 forks source link

VS Code #273

Closed dmonder closed 1 year ago

dmonder commented 2 years ago

Running VS Code (code file.ext) within a OneDrive directory (cd ~/OneDrive/src/dir) fails with the following message:

cannot open path of the current working directory: Permission denied

Expected VS Code to run. This fails whether specifying a file or a directory.

Running VS Code from outside OneDrive (cd ~) executes VS Code (code .). Then the file can be opened using File -> Open and navigating to the same file.

Note: Running VS Code from within a directory in OneDrive (cd ~/OneDrive/src/dir) and then running VS Code with a directory outside of OneDrive (code ~) fails with the same error as above.

Running OneDriver v0.12.0 on Ubuntu 22.04.1 with VS Code 17.0.2 (Snap).

dmonder commented 2 years ago

It seems the only problem is that I cannot run VS Code in the OneDrive folder itself (cd ~/OneDrive/src/dir; code .). I tested another Snap program (htop) and that has the same error. I am able to run VS Code outside of the OneDrive directory structure and even open a folder with the OneDrive without issue.

Fourier33 commented 1 year ago

Hi sir, I exactly met the same probelm. Do you find a way to solve it?

dmonder commented 1 year ago

I have not tested this in a while. Running VS Code outside the OneDrive directory structure always worked for me. Inconvenient but it worked.

Fourier33 commented 1 year ago

I see. It seems I need to live with it. Thanks so much!

jstaf commented 1 year ago

I think this is a problem with Snaps and Snap sandboxing (here's a similar issue with the Firefox snap and sshfs (another FUSE filesystem): https://askubuntu.com/questions/1465752/fuse-mounted-filesystems-and-snap-applications).

When you use VSCode installed natively (.deb or .rpm packaging), cd-ing into the filesystem and doing code . works just fine.

Going to close this as "wontfix" for now - the issue is with the Snap package and its sandboxing - it's something that will need to be solved on the Snap-side of things to allow it access to FUSE filesystem mounts.