You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
"Open containing folder" action uses a hard-coded path for xdg-open #726
The hard-coded path /usr/bin/xdg-open may not exist (such as when using NixOS), causing the "open containing folder" action to silently fail. This should simply use the appropriate $PATH entry (as with the macOS open added in #447).
Logs from a failure:
Traceback (most recent call last):
File "/nix/store/d37h5x02hg7d43nb8rdzwf76jyz05xbn-trackma-0.8.6/lib/python3.11/site-packages/trackma/ui/gtk/window.py", line 589, in _open_folder
subprocess.Popen(["/usr/bin/xdg-open", os.path.dirname(filename)],
File "/nix/store/5k91mg4qjylxbfvrv748smfh51ppjq0g-python3-3.11.6/lib/python3.11/subprocess.py", line 1026, in __init__
self._execute_child(args, executable, preexec_fn, close_fds,
File "/nix/store/5k91mg4qjylxbfvrv748smfh51ppjq0g-python3-3.11.6/lib/python3.11/subprocess.py", line 1950, in _execute_child
raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: '/usr/bin/xdg-open'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/nix/store/d37h5x02hg7d43nb8rdzwf76jyz05xbn-trackma-0.8.6/lib/python3.11/site-packages/trackma/ui/gtk/window.py", line 504, in _on_show_action
self._open_folder(*data)
File "/nix/store/d37h5x02hg7d43nb8rdzwf76jyz05xbn-trackma-0.8.6/lib/python3.11/site-packages/trackma/ui/gtk/window.py", line 594, in _open_folder
raise utils.EngineError("Could not open folder.")
trackma.utils.EngineError: Could not open folder.
Activity
BigBoyBarney commentedon Jan 12, 2024
Assuming
xdg-openis in$PATH, simply replacing/usr/bin/xdg-openwithxdg-openshould solve this, right?Or is NixOS using something else?
magneticflux- commentedon Jan 12, 2024
Yes, it's available on the normal
$PATHso just removing the absolute part should fix it.Not using absolute path for xdg-open (fixes z411#726)
Not using absolute path for xdg-open (fixes z411#726)
Unify code to open folder
Not using absolute path for xdg-open (fixes z411#726)