diff --git a/CHANGELOG.md b/CHANGELOG.md index 7aa6c602b..20d4934c4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,9 +1,8 @@ # 2.0.2 -Fix compiling for MSYS2, no functional changes. - Bugfixes: * Workarund [a compiler bug of GCC](https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85282) (Windows) +* Fix presets not detected by file name (#529) # 2.0.1 diff --git a/src/fastfetch.c b/src/fastfetch.c index 213d37ec1..b06570ea1 100644 --- a/src/fastfetch.c +++ b/src/fastfetch.c @@ -758,7 +758,7 @@ static void optionParseConfigFile(FFdata* data, const char* key, const char* val FF_STRBUF_AUTO_DESTROY absolutePath = ffStrbufCreateA(128); if (ffPathExpandEnv(value, &absolutePath)) { - bool success = isJsonConfig ? parseJsoncFile(value) : parseConfigFile(data, absolutePath.chars); + bool success = isJsonConfig ? parseJsoncFile(absolutePath.chars) : parseConfigFile(data, absolutePath.chars); if(success) return; @@ -773,7 +773,7 @@ static void optionParseConfigFile(FFdata* data, const char* key, const char* val ffStrbufAppendS(&absolutePath, "fastfetch/presets/"); ffStrbufAppendS(&absolutePath, value); - bool success = isJsonConfig ? parseJsoncFile(value) : parseConfigFile(data, absolutePath.chars); + bool success = isJsonConfig ? parseJsoncFile(absolutePath.chars) : parseConfigFile(data, absolutePath.chars); if(success) return;