Fastfetch: don't expand envs in --config

Since it can only be used in command line
This commit is contained in:
李通洲
2024-01-23 13:14:53 +08:00
parent 8f51763374
commit 0b98a14977
+2 -3
View File
@@ -483,10 +483,8 @@ static void optionParseConfigFile(FFdata* data, const char* key, const char* val
if(isJsonConfig ? parseJsoncFile(value) : parseConfigFile(data, value))
return;
FF_STRBUF_AUTO_DESTROY absolutePath = ffStrbufCreateA(128);
if (ffPathExpandEnv(value, &absolutePath))
{
bool success = isJsonConfig ? parseJsoncFile(absolutePath.chars) : parseConfigFile(data, absolutePath.chars);
bool success = isJsonConfig ? parseJsoncFile(value) : parseConfigFile(data, value);
if(success)
return;
@@ -494,6 +492,7 @@ static void optionParseConfigFile(FFdata* data, const char* key, const char* val
//Try to load as a relative path
FF_STRBUF_AUTO_DESTROY absolutePath = ffStrbufCreateA(128);
FF_LIST_FOR_EACH(FFstrbuf, path, instance.state.platform.dataDirs)
{
//We need to copy it, because if a config file loads a config file, the value of path must be unchanged