Skip to content

Commit 1ffd441

Browse files
committed
fix(WeaselSetup): RimeUserDir in registry is empty when default location
1 parent 8d297b3 commit 1ffd441

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

WeaselSetup/WeaselSetup.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,12 @@ static int CustomInstall(bool installing) {
102102
if (0 != install(hant, silent, old_ime_support))
103103
return 1;
104104

105+
if (user_dir.empty()) {
106+
// default user dir %APPDATA%\Rime
107+
WCHAR _path[MAX_PATH] = {0};
108+
ExpandEnvironmentStringsW(L"%APPDATA%\\Rime", _path, _countof(_path));
109+
user_dir = std::wstring(_path);
110+
}
105111
ret = SetRegKeyValue(HKEY_CURRENT_USER, KEY, L"RimeUserDir", user_dir.c_str(),
106112
REG_SZ, false);
107113
if (FAILED(HRESULT_FROM_WIN32(ret))) {

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy