mirror of
https://github.com/clearlinux/linux-steam-integration.git
synced 2026-09-07 14:21:48 +00:00
common: Fix broken ikey mind - correctly build Steam path
Thanks to @TingPing for bailing me out of my own insanity. Signed-off-by: Ikey Doherty <ikey@solus-project.com>
This commit is contained in:
+5
-2
@@ -75,13 +75,16 @@ static inline char *lsi_get_fallback_steam_dir(const char *home)
|
||||
{
|
||||
char *p = NULL;
|
||||
char *xdg_data = getenv("XDG_DATA_HOME");
|
||||
int r = 0;
|
||||
|
||||
/* Respect the XDG_CONFIG_HOME variable if it is set */
|
||||
if (xdg_data) {
|
||||
return strdup(xdg_data);
|
||||
r = asprintf(&p, "%s/Steam", xdg_data);
|
||||
} else {
|
||||
r = asprintf(&p, "%s/.local/share/Steam", home);
|
||||
}
|
||||
|
||||
if (asprintf(&p, "%s/.local/share/Steam", home) < 0) {
|
||||
if (r < 0) {
|
||||
return NULL;
|
||||
}
|
||||
return p;
|
||||
|
||||
Reference in New Issue
Block a user