GWSL-Source icon indicating copy to clipboard operation
GWSL-Source copied to clipboard

Bug when distro name contains underscore character

Open andiluk opened this issue 3 years ago • 1 comments
trafficstars

Hey,

I encountered a bug, when the name of the WSL distribution contains an underscore ('_') (e.g. Ubuntu_Test). In these cases the "Auto-Export Display/Audio" etc. don't work.

Basically all commands which use the machine string will not work (or on a false/other distro) as the distribution argument for wsl.exe will be wrong (e.g. 'wsl.exe -d ' + str(machine) [...]' in wsl_tools.py).

Reason for that is the following line, where the '_' is filtered: https://github.com/Opticos/GWSL-Source/blob/20e53a825a7ef9b3233f253681caa820bdb3add9/manager.py#L825

Adding '_' to the regex pattern should fix it, but there are also some other places where it has to be fixed, like https://github.com/Opticos/GWSL-Source/blob/20e53a825a7ef9b3233f253681caa820bdb3add9/manager.py#L608

Cheers!

andiluk avatar Mar 04 '22 11:03 andiluk

Thanks for catching this. I'll look into it :)

Pololot64 avatar Mar 04 '22 18:03 Pololot64

Fixed 1.4.5

Pololot64 avatar Dec 03 '22 13:12 Pololot64