mirror of
https://github.com/veracrypt/VeraCrypt.git
synced 2025-11-11 11:08:02 -06:00
Windows: when extracting files in Setup or Portable mode, decompress zip files docs.zip and Languages.zip in order to have ready to use configuration.
This commit is contained in:
@@ -644,20 +644,38 @@ void __cdecl ExtractAllFilesThread (void *hwndDlg)
|
|||||||
{
|
{
|
||||||
wchar_t fileName [TC_MAX_PATH] = {0};
|
wchar_t fileName [TC_MAX_PATH] = {0};
|
||||||
wchar_t filePath [TC_MAX_PATH] = {0};
|
wchar_t filePath [TC_MAX_PATH] = {0};
|
||||||
|
BOOL bResult = FALSE, zipFile = FALSE;
|
||||||
|
|
||||||
// Filename
|
// Filename
|
||||||
StringCchCopyNW (fileName, ARRAYSIZE(fileName), Decompressed_Files[fileNo].fileName, Decompressed_Files[fileNo].fileNameLength);
|
StringCchCopyNW (fileName, ARRAYSIZE(fileName), Decompressed_Files[fileNo].fileName, Decompressed_Files[fileNo].fileNameLength);
|
||||||
StringCchCopyW (filePath, ARRAYSIZE(filePath), DestExtractPath);
|
StringCchCopyW (filePath, ARRAYSIZE(filePath), DestExtractPath);
|
||||||
StringCchCatW (filePath, ARRAYSIZE(filePath), fileName);
|
StringCchCatW (filePath, ARRAYSIZE(filePath), fileName);
|
||||||
|
|
||||||
|
if ((wcslen (fileName) > 4) && (0 == wcscmp (L".zip", &fileName[wcslen(fileName) - 4])))
|
||||||
|
zipFile = TRUE;
|
||||||
|
|
||||||
StatusMessageParam (hwndDlg, "EXTRACTING_VERB", filePath);
|
StatusMessageParam (hwndDlg, "EXTRACTING_VERB", filePath);
|
||||||
|
|
||||||
// Write the file
|
if (zipFile)
|
||||||
if (!SaveBufferToFile (
|
{
|
||||||
|
bResult = DecompressZipToDir (
|
||||||
Decompressed_Files[fileNo].fileContent,
|
Decompressed_Files[fileNo].fileContent,
|
||||||
|
Decompressed_Files[fileNo].fileLength,
|
||||||
|
DestExtractPath,
|
||||||
|
CopyMessage,
|
||||||
|
hwndDlg);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
bResult = SaveBufferToFile (
|
||||||
|
(char *) Decompressed_Files[fileNo].fileContent,
|
||||||
filePath,
|
filePath,
|
||||||
Decompressed_Files[fileNo].fileLength,
|
Decompressed_Files[fileNo].fileLength,
|
||||||
FALSE, FALSE))
|
FALSE, FALSE);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Write the file
|
||||||
|
if (!bResult)
|
||||||
{
|
{
|
||||||
wchar_t szTmp[512];
|
wchar_t szTmp[512];
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user