simpler OEM conversion
git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@3991 212acab6-be3b-0410-9dea-997c60f758d6
This commit is contained in:
parent
7455caa968
commit
ebff718526
1 changed files with 1 additions and 6 deletions
|
@ -168,7 +168,6 @@ int tempzip_make(HWND hwndDlg, char *fn)
|
|||
g_extracting=1;
|
||||
do {
|
||||
char filename[MAX_PATH];
|
||||
WCHAR filenameW[MAX_PATH];
|
||||
unz_file_info info;
|
||||
|
||||
unzGetCurrentFileInfo(f,&info,filename,sizeof(filename),NULL,0,NULL,0);
|
||||
|
@ -176,11 +175,7 @@ int tempzip_make(HWND hwndDlg, char *fn)
|
|||
// was zip created on MS-DOS/Windows?
|
||||
if ((info.version & 0xFF00) == 0)
|
||||
{
|
||||
// convert from OEM codepage to ANSI codepage
|
||||
if (MultiByteToWideChar(CP_OEMCP, 0, filename, -1, filenameW, MAX_PATH))
|
||||
{
|
||||
WideCharToMultiByte(CP_ACP, 0, filenameW, -1, filename, MAX_PATH, "-", NULL);
|
||||
}
|
||||
OemToCharBuff(filename, filename, strlen(filename));
|
||||
}
|
||||
|
||||
if (filename[0] &&
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue