-
-
Notifications
You must be signed in to change notification settings - Fork 17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
OpenInWSL doesn't work for files on network drives. #6
Comments
Can you upload the logs? ( remove any personal info first but it would be good to know the details about the path) |
Also is it the store of github version of openinwsl? |
I'm using the store version; I can try the github version in a bit. The network location was of the format
|
I look into this too. Again I am super busy but I won't forget. |
Thanks. Looking into it, it seems that OpenInWSL may have to mount a network drive in the wsl instance in order to get this to work, but I don't know if this would be desirable default behaviour for everyone or not. Looking into this did highlight an issue with OpenInWSL's more general file handling though. It makes a few assumptions that aren't always correct, meaning trying to launch a file from within a linux file system via windows (viz. via \\wsl$) won't work. The issue's with the path_converter function in main.py. It can be fixed simply in pure python, but since wsl comes with the wslpath utility specifically for this reason perhaps using this would be the best approach as I'd expect it to handle more edge cases: import subprocess
def path_converter(path):
subprocess = subprocess.Popen(f"wsl wslpath -a \'{path}\'", shell=True, stdout=subprocess.PIPE)
nix_path = subprocess.stdout.read().strip().decode('UTF-8')
return nix_path I'd submit a PR but am unable to properly test this in windows at present. |
Thanks for digging again :) Yep. I should rewrite this. Unfortunately the earliest I can release changes is in December. |
No problem. Thanks for all your hard work on this and GWSL. :) |
As per the title, I've been unable to launch files in windows explorer with OpenInWSL if they're on a network driver. The popup at the top of the screen that OpenInWSL usually displays to indicate how the file is being opened fails to appear also. Creating a local copy of such a file, OpenInWSL will then work as expected.
The text was updated successfully, but these errors were encountered: