Skip to content
Snippets Groups Projects
Commit fa764426 authored by Ludovico de Nittis's avatar Ludovico de Nittis
Browse files

graphics: Do not load JSON ICDs multiple times from the same dirs

When we build the search paths for the JSON ICDs it might happen to have
the same directory multiple times.
For example if we have "XDG_CONFIG_DIRS=/usr/share" and
"XDG_DATA_DIRS=/usr/share" we will look in "/usr/share" two times and
duplicate all the JSONs that we find.

Usually this is not an issue but with some games, e.g. Red Dead
Redemption 2, this can cause a crash at startup
https://github.com/ValveSoftware/steam-runtime/issues/336



With this commit we filter out the directories that we already visited
to prevent this kind of issues.

Fixes: #48

Signed-off-by: default avatarLudovico de Nittis <ludovico.denittis@collabora.com>
parent 2c3ce248
Branches
Tags
1 merge request!205graphics: Do not load JSON ICDs multiple times from the same dirs
Pipeline #6881 passed
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment