fix: "bottles:run/" uri processing
Description
It all started when I created a shortcut for Steam. After launching it, the bottle selection menu appeared and nothing else happened.
As tests have shown, the try block was always executed successfully (the return occurred immediately after the bottle selection GUI was created). Processing of bottles:run/ never occurred.
https://github.com/bottlesdevs/Bottles/blob/7e60ede5e2e994e9574bdce876ca508c51ee7266/bottles/frontend/main.py#L203-L208
In addition, the URI was then passed as is as the "-e" argument to bottles-cli, which led to a crash.
https://github.com/bottlesdevs/Bottles/blob/7e60ede5e2e994e9574bdce876ca508c51ee7266/bottles/frontend/windows/bottlepicker.py#L79-L80
After this small patch, URI processing is now done first. In addition, the bottle selection GUI no longer appears (I can’t understand why the selection is needed if the bottle is ALREADY specified in the URI)
Fixes #3443 (At least it looks a lot like it)
Type of change
- [x] Bug fix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
- [ ] This change requires a documentation update
How Has This Been Tested?
- [x] Run
xdg-open bottles:run/<bottle>/<program>without patch (not working) - [x] Run
xdg-open bottles:run/<bottle>/<program>with patch (working)