Commit 80891ab0 authored by npzacs's avatar npzacs
Browse files

parser: fix opening KEYDB.cfg in Windows

(non-ASCII paths)
parent ab493d37
......@@ -469,7 +469,15 @@ int keydbcfg_parse_config(config_file *cfgfile, const char *path)
if (!cfgfile || !path)
return 0;
#ifdef _WIN32
wchar_t wfilename[MAX_PATH];
if (!MultiByteToWideChar(CP_UTF8, MB_ERR_INVALID_CHARS, filename, -1, wfilename, MAX_PATH))
return 0;
}
fp = _wfopen(wfilename, L"r");
#else
FILE * fp = fopen(path, "r");
#endif
if (!fp)
return 0;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment