mirror of
https://github.com/reactos/reactos.git
synced 2025-06-04 08:50:27 +00:00
[ZIPFLDR] Show error when compression method is not supported
CORE-17255
This commit is contained in:
parent
5da934e34d
commit
7e3a7a0e84
16 changed files with 36 additions and 4 deletions
|
@ -590,7 +590,6 @@ public:
|
|||
break;
|
||||
|
||||
case eExtractAbort:
|
||||
case eOpenError:
|
||||
case eUnpackError:
|
||||
{
|
||||
Close();
|
||||
|
@ -627,6 +626,20 @@ public:
|
|||
}
|
||||
break;
|
||||
}
|
||||
|
||||
case eOpenError:
|
||||
{
|
||||
if (err == UNZ_BADZIPFILE &&
|
||||
Info.compression_method != 0 &&
|
||||
Info.compression_method != Z_DEFLATED &&
|
||||
Info.compression_method != Z_BZIP2ED)
|
||||
{
|
||||
if (ShowExtractError(hDlg, FullPath, Info.compression_method, eOpenError) == IDYES)
|
||||
break;
|
||||
}
|
||||
Close();
|
||||
return false;
|
||||
}
|
||||
}
|
||||
if (Result == eNoError && is_dir)
|
||||
continue;
|
||||
|
@ -643,7 +656,7 @@ public:
|
|||
CStringA strErr, strText;
|
||||
PSTR Win32ErrorString;
|
||||
|
||||
if (ErrorType == eFileError)
|
||||
if (ErrorType == eFileError || ErrorType == eOpenError)
|
||||
strText.LoadString(IDS_CANTEXTRACTFILE);
|
||||
else
|
||||
strText.LoadString(GetModuleHandleA("shell32.dll"), 128); // IDS_CREATEFOLDER_DENIED
|
||||
|
@ -660,7 +673,9 @@ public:
|
|||
LocalFree(Win32ErrorString);
|
||||
}
|
||||
}
|
||||
if (strErr.GetLength() == 0)
|
||||
if (ErrorType == eOpenError)
|
||||
strErr.Format(IDS_DECOMPRESSERROR, Error);
|
||||
else if (strErr.GetLength() == 0)
|
||||
strErr.Format(IDS_UNKNOWNERROR, Error);
|
||||
|
||||
strText.Append("\r\n\r\n" + strErr);
|
||||
|
@ -670,6 +685,8 @@ public:
|
|||
mbFlags |= MB_RETRYCANCEL;
|
||||
else if (ErrorType == eFileError)
|
||||
mbFlags |= MB_ABORTRETRYIGNORE;
|
||||
else if (ErrorType == eOpenError)
|
||||
mbFlags |= MB_YESNO;
|
||||
|
||||
return MessageBoxA(hDlg, strText, strTitle, mbFlags);
|
||||
}
|
||||
|
|
|
@ -77,6 +77,7 @@ BEGIN
|
|||
IDS_CANTREADFILE "Datei '%s' konnte nicht gelesen werden."
|
||||
IDS_EXTRACTING "Extrahieren..."
|
||||
IDS_CANTEXTRACTFILE "Datei '%1' konnte nicht extrahiert werden."
|
||||
IDS_DECOMPRESSERROR "Unsupported compression method %d. Do you want to continue?"
|
||||
IDS_UNKNOWNERROR "Unbekannter Fehler 0x%08x."
|
||||
|
||||
IDS_WIZ_TITLE "Extrahier-Assistent"
|
||||
|
|
|
@ -77,6 +77,7 @@ BEGIN
|
|||
IDS_CANTREADFILE "Cannot read file '%s'."
|
||||
IDS_EXTRACTING "Extracting..."
|
||||
IDS_CANTEXTRACTFILE "Cannot extract file '%1'."
|
||||
IDS_DECOMPRESSERROR "Unsupported compression method %d. Do you want to continue?"
|
||||
IDS_UNKNOWNERROR "Unknown error 0x%08x."
|
||||
|
||||
IDS_WIZ_TITLE "Extraction Wizard"
|
||||
|
|
|
@ -77,6 +77,7 @@ BEGIN
|
|||
IDS_CANTREADFILE "Cannot read file '%s'."
|
||||
IDS_EXTRACTING "Ekstraktimine..."
|
||||
IDS_CANTEXTRACTFILE "Cannot extract file '%1'."
|
||||
IDS_DECOMPRESSERROR "Unsupported compression method %d. Do you want to continue?"
|
||||
IDS_UNKNOWNERROR "Unknown error 0x%08x."
|
||||
|
||||
IDS_WIZ_TITLE "Ekstraktimise visard"
|
||||
|
|
|
@ -77,6 +77,7 @@ BEGIN
|
|||
IDS_CANTREADFILE "Cannot read file '%s'."
|
||||
IDS_EXTRACTING "Extraction..."
|
||||
IDS_CANTEXTRACTFILE "Cannot extract file '%1'."
|
||||
IDS_DECOMPRESSERROR "Unsupported compression method %d. Do you want to continue?"
|
||||
IDS_UNKNOWNERROR "Unknown error 0x%08x."
|
||||
|
||||
IDS_WIZ_TITLE "Assistant d'extraction"
|
||||
|
|
|
@ -64,6 +64,7 @@ BEGIN
|
|||
IDS_CANTREADFILE "Cannot read file '%s'."
|
||||
IDS_EXTRACTING "Extracting..."
|
||||
IDS_CANTEXTRACTFILE "Cannot extract file '%1'."
|
||||
IDS_DECOMPRESSERROR "Unsupported compression method %d. Do you want to continue?"
|
||||
IDS_UNKNOWNERROR "Unknown error 0x%08x."
|
||||
|
||||
IDS_WIZ_TITLE "निष्कर्षण विज़ार्ड"
|
||||
|
|
|
@ -77,6 +77,7 @@ BEGIN
|
|||
IDS_CANTREADFILE "Cannot read file '%s'."
|
||||
IDS_EXTRACTING "Estrazione..."
|
||||
IDS_CANTEXTRACTFILE "Cannot extract file '%1'."
|
||||
IDS_DECOMPRESSERROR "Unsupported compression method %d. Do you want to continue?"
|
||||
IDS_UNKNOWNERROR "Unknown error 0x%08x."
|
||||
|
||||
IDS_WIZ_TITLE "Estrazione Guidata"
|
||||
|
|
|
@ -77,6 +77,7 @@ BEGIN
|
|||
IDS_CANTREADFILE "ファイル '%s' が読めません。"
|
||||
IDS_EXTRACTING "展開中..."
|
||||
IDS_CANTEXTRACTFILE "Cannot extract file '%1'."
|
||||
IDS_DECOMPRESSERROR "Unsupported compression method %d. Do you want to continue?"
|
||||
IDS_UNKNOWNERROR "Unknown error 0x%08x."
|
||||
|
||||
IDS_WIZ_TITLE "展開ウィザード"
|
||||
|
|
|
@ -78,6 +78,7 @@ BEGIN
|
|||
IDS_CANTREADFILE "Błąd podczas czytania pliku '%s'."
|
||||
IDS_EXTRACTING "Trwa wyodrębnianie..."
|
||||
IDS_CANTEXTRACTFILE "Cannot extract file '%1'."
|
||||
IDS_DECOMPRESSERROR "Unsupported compression method %d. Do you want to continue?"
|
||||
IDS_UNKNOWNERROR "Unknown error 0x%08x."
|
||||
|
||||
IDS_WIZ_TITLE "Kreator wyodrębniania"
|
||||
|
|
|
@ -77,6 +77,7 @@ BEGIN
|
|||
IDS_CANTREADFILE "Não é possível ler o arquivo '%s'."
|
||||
IDS_EXTRACTING "A extrair..."
|
||||
IDS_CANTEXTRACTFILE "Cannot extract file '%1'."
|
||||
IDS_DECOMPRESSERROR "Unsupported compression method %d. Do you want to continue?"
|
||||
IDS_UNKNOWNERROR "Unknown error 0x%08x."
|
||||
|
||||
IDS_WIZ_TITLE "Assistente de extração"
|
||||
|
|
|
@ -77,6 +77,7 @@ BEGIN
|
|||
IDS_CANTREADFILE "Cannot read file '%s'."
|
||||
IDS_EXTRACTING "Extragere..."
|
||||
IDS_CANTEXTRACTFILE "Cannot extract file '%1'."
|
||||
IDS_DECOMPRESSERROR "Unsupported compression method %d. Do you want to continue?"
|
||||
IDS_UNKNOWNERROR "Unknown error 0x%08x."
|
||||
|
||||
IDS_WIZ_TITLE "Asistent de extracție"
|
||||
|
|
|
@ -77,6 +77,7 @@ BEGIN
|
|||
IDS_CANTREADFILE "Не удалось прочитать файл '%s'."
|
||||
IDS_EXTRACTING "Извлечение..."
|
||||
IDS_CANTEXTRACTFILE "Не удалось извлечь файл '%1'."
|
||||
IDS_DECOMPRESSERROR "Неизвестный метод компрессии %d. Продолжить?"
|
||||
IDS_UNKNOWNERROR "Неизвестная ошибка 0x%08x."
|
||||
|
||||
IDS_WIZ_TITLE "Мастер извлечения архивов"
|
||||
|
|
|
@ -77,6 +77,7 @@ BEGIN
|
|||
IDS_CANTREADFILE "Cannot read file '%s'."
|
||||
IDS_EXTRACTING "Extraherar..."
|
||||
IDS_CANTEXTRACTFILE "Cannot extract file '%1'."
|
||||
IDS_DECOMPRESSERROR "Unsupported compression method %d. Do you want to continue?"
|
||||
IDS_UNKNOWNERROR "Unknown error 0x%08x."
|
||||
|
||||
IDS_WIZ_TITLE "Extraheringsguiden"
|
||||
|
|
|
@ -77,6 +77,7 @@ BEGIN
|
|||
IDS_CANTREADFILE "Cannot read file '%s'."
|
||||
IDS_EXTRACTING "正在解压..."
|
||||
IDS_CANTEXTRACTFILE "Cannot extract file '%1'."
|
||||
IDS_DECOMPRESSERROR "Unsupported compression method %d. Do you want to continue?"
|
||||
IDS_UNKNOWNERROR "Unknown error 0x%08x."
|
||||
|
||||
IDS_WIZ_TITLE "解压向导"
|
||||
|
|
|
@ -80,6 +80,7 @@ BEGIN
|
|||
IDS_CANTREADFILE "無法讀取檔案 '%s'."
|
||||
IDS_EXTRACTING "正在解壓縮..."
|
||||
IDS_CANTEXTRACTFILE "Cannot extract file '%1'."
|
||||
IDS_DECOMPRESSERROR "Unsupported compression method %d. Do you want to continue?"
|
||||
IDS_UNKNOWNERROR "Unknown error 0x%08x."
|
||||
|
||||
IDS_WIZ_TITLE "解壓縮精靈"
|
||||
|
|
|
@ -48,7 +48,8 @@
|
|||
#define IDS_CANTREADFILE 113
|
||||
#define IDS_EXTRACTING 114
|
||||
#define IDS_CANTEXTRACTFILE 115
|
||||
#define IDS_UNKNOWNERROR 116
|
||||
#define IDS_DECOMPRESSERROR 116
|
||||
#define IDS_UNKNOWNERROR 117
|
||||
|
||||
/* Wizard titles */
|
||||
#define IDS_WIZ_TITLE 8000
|
||||
|
|
Loading…
Reference in a new issue