GWSL-Source
GWSL-Source copied to clipboard
Bug when distro name contains underscore character
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!
Thanks for catching this. I'll look into it :)
Fixed 1.4.5