...
|
...
|
@@ -80,7 +80,7 @@ const char *types[] = {
|
80
|
80
|
NULL
|
81
|
81
|
};
|
82
|
82
|
|
83
|
|
-int WINAPI SHCreateDirectoryExA(HWND, LPCTSTR, SECURITY_ATTRIBUTES *); /* cannot include Shlobj.h due to DATADIR collision */
|
|
83
|
+int WINAPI SHCreateDirectoryExW(HWND, LPCTSTR, SECURITY_ATTRIBUTES *); /* cannot include Shlobj.h due to DATADIR collision */
|
84
|
84
|
|
85
|
85
|
#define FMT(s) "!"__FUNCTION__": "s"\n"
|
86
|
86
|
#define FAIL(errcode, fmt, ...) do { logg(FMT(fmt), __VA_ARGS__); return (errcode); } while(0)
|
...
|
...
|
@@ -453,7 +453,7 @@ int CLAMAPI Scan_Initialize(const wchar_t *pEnginesFolder, const wchar_t *pTempR
|
453
|
453
|
}
|
454
|
454
|
memcpy(&tmpdir[ret+1], "\\clamtmp", 9);
|
455
|
455
|
cli_rmdirs(tmpdir);
|
456
|
|
- if((ret = SHCreateDirectoryExA(NULL, tmpdir, NULL) != ERROR_SUCCESS) && ret != ERROR_ALREADY_EXISTS) {
|
|
456
|
+ if((ret = SHCreateDirectoryExW(NULL, tmpdir, NULL) != ERROR_SUCCESS) && ret != ERROR_ALREADY_EXISTS) {
|
457
|
457
|
free_engine_and_unlock();
|
458
|
458
|
FAIL(CL_ETMPDIR, "Cannot create pTempRoot '%s': error %d", tmpdir, ret);
|
459
|
459
|
}
|