Internal Editor: Visual Studio Code

Advertisement

hajekj
Donor
hajekj avatar
Joined:
Posts:
15
Location:
Czech Republic

Internal Editor: Visual Studio Code

I have VSCode installed in the user folder (the recommended way to install VS Code by Microsoft) - C:\Users\hajek\AppData\Local\Programs\Microsoft VS Code\Code.exe

When setting it as internal editor, I end up getting error:

System Error. Code: 1392.
The file or directory is corrupted and unreadable


The file exists in my filesystem and I am successfuly able to launch it and navigate to it

I think this was working before. I changed it to launch C:\Users\hajek\AppData\Local\Programs\Microsoft VS Code\bin\code.cmd however this is not much comfortable since it opens command-line.

Reply with quote

Advertisement

hajekj
Donor
hajekj avatar
Joined:
Posts:
15
Location:
Czech Republic

I made a very interesting observation...

My WinSCP installation comes from Microsoft Store. When I downloaded the portable WinSCP executable (same config as Microsoft Store) this error doesn't occur. So it must definitely have something to do with how WinSCP is run when running in sandbox.

Also when setting editor, the icon of Code.exe is not visible for WinSCP from Store, but when setting it from the portable installation, the icon displays... I would say it has something to do with permissions.

Also I am quite unsure about this - the exe's file size on disk is 0 bytes when open from WinSCP from store (see image). When open from explorer, it displays fine...

Annotation 2019-06-08 115549.jpg

Annotation 2019-06-08 115410.jpg

Reply with quote

hajekj
Donor
hajekj avatar
Joined:
Posts:
15
Location:
Czech Republic

I made a copy of Code.exe which shows up fine in the list...

It appears that it doesn't for some reason like "Code.exe" in that specific path "C:\Users\hajek\AppData\Local\Programs\Microsoft VS Code". I tried doing the same in another folder but wasn't able to reproduce it.

I also double checked file permissions via icacls but they are the same for both files.

I would say that WinSCP is run is some different user context / limited permissions because of App-V... But this would probably have to go to Microsoft for investigation.

Also one more thing I noticed, if I copied Code.exe within the editor selection prompt, it didn't appear in my explorer... Only after I deleted it, it appeared in the recycle bin and after restore it was there (with no disk size, so probably some sandbox corruption).

Annotation 2019-06-08 115955.jpg

Reply with quote

hajekj
Donor
hajekj avatar
Joined:
Posts:
15
Location:
Czech Republic

Okay, sorry for the spam, but I managed to resolve this!

It appears that the underlying filesystem for the Store (reference: https://docs.microsoft.com/en-us/windows/msix/desktop/desktop-to-uwp-behind-the-scenes#file-system) version of WinSCP became corrupt...

Simply go to C:\Users\%USERNAME%\AppData\Local\Packages\MartinPikryl.WinSCP_tvv458r3h9r5m\LocalCache\Local and delete the Programs folder or the Microsoft VS Code folder which is under it. Then everything should be working fine again.

I have no idea how this happened, but I am finally happy I got it resolved.

Reply with quote

Advertisement

Advertisement

You can post new topics in this forum