oops in last minute "cleanup"

This commit is contained in:
Jean-Francois Dockes 2019-07-21 20:36:43 +02:00
parent 049ba1e7e4
commit 3681e997e0

View File

@ -117,14 +117,14 @@ string path_wingettempfilename(wchar_t *pref)
utf8towchar(tdir, dbuf, MAX_PATH);
wchar_t buf[MAX_PATH + 1];
GetTempFileNameW(dbuf, pref, 0, buf);
string filename;
wchartoutf8(buf, filename);
// Windows will have created a temp file, we delete it.
if (!DeleteFileW(buf)) {
LOGSYSERR("path_wingettempfilename", "DeleteFileW", filename);
} else {
LOGDEB1("path_wingettempfilename: DeleteFile " << filename << " Ok\n");
}
string filename;
wchartoutf8(buf, filename);
path_slashize(filename);
return filename;
}