continue icon indicating copy to clipboard operation
continue copied to clipboard

Fixes issue #2313 - Convert WSL2 file paths to Windows file paths

Open steverhoades opened this issue 1 year ago • 4 comments

Description

When using VSCode on Windows where projects are hosted in a linux WSL2 environment the Open Files Context Provider fails. The reason is that VSCode does not know how to interpret the filepaths.

This PR adds a conversion step to all file paths if the given path is coming from a WSL2 environment.

Checklist

  • [x] The base branch of this PR is dev, rather than main
  • [x] The relevant docs, if any, have been updated or created

Testing

Added a unit test for the VsCodeIde.ts class covering these specific changes.

steverhoades avatar Sep 29 '24 20:09 steverhoades

@sestinj is there something that is blocking this from being merged, anything I can address? It'd be nice to get that sweet open file functionality in my instance of VSCode without running my local copy.

steverhoades avatar Oct 03 '24 01:10 steverhoades

Just a heads up, I think i've discovered a much simpler approach to solve this issue without having to run the wslpath process. I'll be pushing the update here shortly.

steverhoades avatar Oct 04 '24 06:10 steverhoades

@sestinj I've push my change to remove the process call to wslpath, i've tested this locally and it works. I suspect this could also fix the remote-file issue I read about earlier however I have not had a chance to test that.

steverhoades avatar Oct 04 '24 07:10 steverhoades

Potentially fixes #2451.

steverhoades avatar Oct 04 '24 07:10 steverhoades

@steverhoades this is excellent! Thanks for finding a cleaner way, and sorry for delay. If you could do me a quick favor and remove the package-lock/package.json changes (they look unnecessary now) I'll go ahead and merge!

sestinj avatar Oct 04 '24 17:10 sestinj

done

steverhoades avatar Oct 04 '24 17:10 steverhoades

Beautiful, thank you!

sestinj avatar Oct 04 '24 23:10 sestinj