From f3db4e49b6ac832ddb27cd712520ba8831d666fb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E9=80=9A=E6=B4=B2?= Date: Tue, 3 Jan 2023 16:56:18 +0800 Subject: [PATCH] Windows: store config file in RoamingAppData instead of LocalAppData --- CHANGELOG.md | 2 +- src/common/init.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 474deb29b..e9fdb4935 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,7 +7,7 @@ Notable Changes: Features: * `--logo-padding-top` option (@CarterLi, #372) * Raw image file as logo support (@CarterLi) -* Look for config files in `$LOCALAPPDATA` (Windows) +* Look for config files in `$APPDATA` ([RoamingAppData](https://superuser.com/questions/21458/why-are-there-directories-called-local-locallow-and-roaming-under-users-user#answer-21462)) (Windows) * Look for config files in `~/Library/Preferences` (macOS) * Add `--list-config-paths` option which list search paths of config files diff --git a/src/common/init.c b/src/common/init.c index 0e76a4470..3e4243a4f 100644 --- a/src/common/init.c +++ b/src/common/init.c @@ -26,7 +26,7 @@ static void initConfigDirs(FFstate* state) { PWSTR pPath; - if(SUCCEEDED(SHGetKnownFolderPath(&FOLDERID_LocalAppData, 0, NULL, &pPath))) + if(SUCCEEDED(SHGetKnownFolderPath(&FOLDERID_RoamingAppData, 0, NULL, &pPath))) { FFstrbuf* buffer = (FFstrbuf*) ffListAdd(&state->configDirs); ffStrbufInit(buffer);