3

I'm using eclipse on windows to connect to files on a wsl, and I have run into what is apparently an eclipse bug which file names such as \wsl$\folder1\pom.xml get mangled. https://bugs.eclipse.org/bugs/show_bug.cgi?id=577938

A comment in the bug report suggests a possible workaround

A workaround is to map the UNC path to a drive letter, but this shouldn't be necessary

How would I do that?

Gonen I
  • 5,576
  • 1
  • 29
  • 60

1 Answers1

6

I did it this way (drive j: was available)

net use j: \\wsl$\Ubuntu

Note that this is persistent, and if not deleted can cause wsl2 to restart by itself. After doing this I was able to access files on the Ubuntu distro from windows emacs.

to delete it:

net use /del j:
ian
  • 83
  • 4
  • Also make sure you don't use a trailing backslash: `net use j: \\wsl$\Ubuntu\` fails. It also seems that mounting a subdirectory doesn't work either. – cdleonard Mar 08 '23 at 08:24