summaryrefslogtreecommitdiff
path: root/updater/utils.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'updater/utils.cpp')
-rw-r--r--updater/utils.cpp24
1 files changed, 18 insertions, 6 deletions
diff --git a/updater/utils.cpp b/updater/utils.cpp
index e1ffdea..6e1afad 100644
--- a/updater/utils.cpp
+++ b/updater/utils.cpp
@@ -118,9 +118,8 @@ bool DeleteNonDlls(const TCHAR *folder)
TCHAR szFilesPath[MAX_PATH];
{
- char buff[200], *ts;
- mir_snprintf(buff, SIZEOF(buff), "Deleting non-dlls in %s", (ts = mir_t2a(folder)));
- mir_free(ts);
+ TCHAR buff[200];
+ mir_sntprintf(buff, SIZEOF(buff), _T("Deleting non-dlls in %s"), folder);
NLog(buff);
}
@@ -140,9 +139,8 @@ bool DeleteNonDlls(const TCHAR *folder)
if (_tcsstr(findData.cFileName, _T(".dll")) == 0)
{
{
- char buff[200], *ts;
- mir_snprintf(buff, SIZEOF(buff), "Deleting %s", (ts = mir_t2a(folder)));
- mir_free(ts);
+ TCHAR buff[200];
+ mir_sntprintf(buff, SIZEOF(buff), _T("Deleting %s"), folder);
NLog(buff);
}
DeleteFile(szFilesPath);
@@ -155,3 +153,17 @@ bool DeleteNonDlls(const TCHAR *folder)
return true;
}
+
+void NLog(char *msg)
+{
+ CallService(MS_NETLIB_LOG, (WPARAM)hNetlibUser, (LPARAM)msg);
+}
+
+#ifdef _UNICODE
+void NLog(wchar_t *msg)
+{
+ char* a = mir_u2a(msg);
+ CallService(MS_NETLIB_LOG, (WPARAM)hNetlibUser, (LPARAM)a);
+ mir_free(a);
+}
+#endif \ No newline at end of file