Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
VSCODE cannot save file launched by WSL 18.04 #50996
Before jumping to the issue let me briefly introduce the environment:
also after that I closed the VSCode from windows side and looking whether at least empty file of "a,c' was created at WSL side ,as permissioned denied I think it wasn't created.But it is created at System32 :( (how can it be ? that's why permission issue exist)
Please mentioned did I follow a wrong procedure or is this a misuse or expected behavior, also I really need this feature it is very convenient if we have this saving feature.
the a.c file opend with VSCODE is empty since its path is not valid(not exists in WSL).
@macxfadz Because when you launch code from a Linux folder it opens an empty file on C:\Windows\System32 and you can't save there without being elevated.
If you just want to open a file with Code Windows version make sure the file it's on a /mnt/* folder.
If you truly need to open a file from a /home/* folder use Code Linux version with a x11 Windows server like you are already doing with gedit.
Your WSL Linux distros' filesystems are not accessible from Windows. Thus, when you try to launch VSCode (or any Win32 binary) to load/access a file from, for example,
And don't try and circumvent this by spelunking through the filesystem, finding where your distro root folders are located and trying to create/modify files directly: HERE BE DRAGONS; you are VERY likely to end up with corrupted files and/or data loss, as described in this still-current post.
We do have tasks on our backlog to address this interop scenario, which will eventually allow Windows apps to seamlessly access and work on/with Linux files, but until we've announced such features, we recommend storing files that you want/need to access via both Windows and Linux tools on your Windows filesystem and accessing them via the