Don't fail on inaccessible paths
When a library path (from `/etc/ld.so.conf` or `LD_LIBRARY_PATH`) is not accessible for the current user, `nixglhost` fails. For example:
$ LD_LIBRARY_PATH=/root nixglhost ls
...
File "/nix/store/ch7nppfsp3zpdyimralb1zc5h6dpz9sx-nix-gl-host-0.1/bin/nixglhost", line 302, in resolve_libraries
for fname in os.listdir(path):
^^^^^^^^^^^^^^^^
PermissionError: [Errno 13] Permission denied: '/root'
This patch fixes that by printing a warning and continuing:
$ LD_LIBRARY_PATH=/root nixglhost ls
WARNING: [Errno 13] Permission denied: '/root'
README.md ...
合并状态:未合并 关闭于 2024-09-18 1 条评论