Skip to content

replace wsl-open with wslpath and explorer.exe#15968

Merged
AUTOMATIC1111 merged 1 commit intodevfrom
wsl-open
Jun 8, 2024
Merged

replace wsl-open with wslpath and explorer.exe#15968
AUTOMATIC1111 merged 1 commit intodevfrom
wsl-open

Conversation

@w-e-w
Copy link
Copy Markdown
Collaborator

@w-e-w w-e-w commented Jun 8, 2024

Description

according to

using wsl-open directory don't work anymore

in the post he suggest using wslview from wslu but that requires installing an extra piece of software on system

I looked around and apparently one use can wslpath to convert a wsl path to windows path then call explorer.exe in wsl

        subprocess.Popen(["explorer.exe", subprocess.check_output(["wslpath", "-w", path])])

it is possible to make this into one subprocess call using bash but I didn't because I don't want to deal with escaping and quoting characters

I have tested using a standalone script inside my WSL that this seems to work properly
I have not tested in full and across different flavors of wsl

Checklist:

@w-e-w w-e-w requested a review from AUTOMATIC1111 as a code owner June 8, 2024 07:49
@w-e-w w-e-w changed the base branch from master to dev June 8, 2024 07:52
@AUTOMATIC1111 AUTOMATIC1111 merged commit 194c262 into dev Jun 8, 2024
@AUTOMATIC1111 AUTOMATIC1111 deleted the wsl-open branch June 8, 2024 09:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants