mirror of
https://github.com/fastfetch-cli/fastfetch.git
synced 2026-09-13 02:42:09 +02:00
Fastfetch: try $exePath/presets with --load-config
This commit is contained in:
@@ -779,6 +779,19 @@ static void optionParseConfigFile(FFdata* data, const char* key, const char* val
|
||||
return;
|
||||
}
|
||||
|
||||
{
|
||||
//Try exe path
|
||||
ffStrbufSet(&absolutePath, &instance.state.platform.exePath);
|
||||
ffStrbufSubstrBeforeLastC(&absolutePath, '/');
|
||||
ffStrbufAppendS(&absolutePath, "/presets/");
|
||||
ffStrbufAppendS(&absolutePath, value);
|
||||
|
||||
bool success = isJsonConfig ? parseJsoncFile(absolutePath.chars) : parseConfigFile(data, absolutePath.chars);
|
||||
|
||||
if(success)
|
||||
return;
|
||||
}
|
||||
|
||||
//File not found
|
||||
|
||||
fprintf(stderr, "Error: couldn't find config: %s\n", value);
|
||||
|
||||
Reference in New Issue
Block a user