Skip to content

Commit 39ff218

Browse files
committed
Fix XDG_CONFIG_HOME being ignored
1 parent 984fab2 commit 39ff218

File tree

2 files changed

+9
-5
lines changed

2 files changed

+9
-5
lines changed

CHANGELOG

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
*******************************************************************************
44

55
=== 1.0.31 ===
6-
6+
* Fixed $XDG_CONFIG_HOME being ignored.
77

88
=== 1.0.30 ===
99
* Added possibility to perform casted fetch from expr::value_t.

src/main/runtime/system.cpp

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -293,11 +293,15 @@ namespace lsp
293293
}
294294
}
295295
#else
296-
status_t res = get_env_var("HOME", &upath);
296+
status_t res = get_env_var("XDG_CONFIG_HOME", &upath);
297297
if (res != STATUS_OK)
298-
return res;
299-
if (!upath.append_ascii(FILE_SEPARATOR_S ".config"))
300-
return STATUS_NO_MEM;
298+
{
299+
res = get_env_var("HOME", &upath);
300+
if (res != STATUS_OK)
301+
return res;
302+
if (!upath.append_ascii(FILE_SEPARATOR_S ".config"))
303+
return STATUS_NO_MEM;
304+
}
301305
#endif /* PLATFORM_WINDOWS */
302306

303307
path->swap(&upath);

0 commit comments

Comments
 (0)