From 34db4cfe0976fa12525fd2df18a0e04113e502cc Mon Sep 17 00:00:00 2001 From: George Hazan Date: Sun, 24 Jul 2022 17:44:43 +0300 Subject: code cleaning --- src/mir_app/src/chat_tools.cpp | 4 ++-- src/mir_app/src/pu_utils.cpp | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/mir_app/src/chat_tools.cpp b/src/mir_app/src/chat_tools.cpp index 6fb9642c13..4eba89b258 100644 --- a/src/mir_app/src/chat_tools.cpp +++ b/src/mir_app/src/chat_tools.cpp @@ -594,8 +594,8 @@ BOOL LogToFile(SESSION_INFO *si, GCEVENT *gce) fclose(hFile); hFile = nullptr; if (!PathFileExists(tszNewName)) - CopyFile(si->pszLogFileName, tszNewName, TRUE); - DeleteFile(si->pszLogFileName); + CopyFileW(si->pszLogFileName, tszNewName, TRUE); + DeleteFileW(si->pszLogFileName); } } } diff --git a/src/mir_app/src/pu_utils.cpp b/src/mir_app/src/pu_utils.cpp index 87a78ac374..622f483705 100644 --- a/src/mir_app/src/pu_utils.cpp +++ b/src/mir_app/src/pu_utils.cpp @@ -147,7 +147,7 @@ MIR_APP_DLL(bool) PU::PrepareEscalation() if (hFile != INVALID_HANDLE_VALUE) { // we are admins or UAC is disable, cool CloseHandle(hFile); - DeleteFile(szPath); + DeleteFileW(szPath); return true; } @@ -276,7 +276,7 @@ MIR_APP_DLL(int) PU::SafeMoveFile(const wchar_t *pSrc, const wchar_t *pDst) MIR_APP_DLL(int) PU::SafeDeleteFile(const wchar_t *pwszFile) { if (g_hPipe == nullptr) - return DeleteFile(pwszFile); + return DeleteFileW(pwszFile); return TransactPipe(3, pwszFile, nullptr); } -- cgit v1.2.3