macOS: looking for config files in ~/Library/Preferences

This commit is contained in:
李通洲
2023-01-02 15:38:29 +08:00
parent ae6d921f23
commit 3caa92c567
2 changed files with 12 additions and 3 deletions
+3 -2
View File
@@ -6,7 +6,8 @@ Notable Changes:
Features:
* `--logo-padding-top` option (@CarterLi, #372)
* Raw image file as logo support (@CarterLi)
* Look for config files in $LOCALAPPDATA (Windows) (@CarterLi)
* Look for config files in `$LOCALAPPDATA` (Windows)
* Look for config files in `~/Library/Preferences` (macOS)
Logos:
* Raspbian (@IamNoRobot, #373)
@@ -16,7 +17,7 @@ Bugfixes:
Other:
* Fixed a Typo in iterm error message (@jessebot, #376)
* Don't try to load config file in `/etc` (Windows) (@jessebot, #376)
* Don't try to load config file in `/etc` (Windows)
# 1.8.2
+9 -1
View File
@@ -37,7 +37,15 @@ static void initConfigDirs(FFstate* state)
CoTaskMemFree(pPath);
}
#elif !(defined(__APPLE__) || defined(__ANDROID__))
#elif defined(__APPLE__)
{
FFstrbuf* buffer = (FFstrbuf*) ffListAdd(&state->configDirs);
ffStrbufInitS(buffer, state->passwd->pw_dir);
ffStrbufAppendS(buffer, "/Library/Preferences/");
}
#elif !defined(__ANDROID__)
const char* xdgConfigHome = getenv("XDG_CONFIG_HOME");
if(ffStrSet(xdgConfigHome))