Update to 7-Zip Version 18.06

This commit is contained in:
Tino Reichardt
2018-12-30 12:50:20 +01:00
parent 093cf20bad
commit a488536124
116 changed files with 1830 additions and 955 deletions

View File

@@ -332,7 +332,7 @@ void CHashCallbackConsole::PrintProperty(const char *name, UInt64 value)
*_so << name << s << endl;
}
HRESULT CHashCallbackConsole::AfterLastFile(const CHashBundle &hb)
HRESULT CHashCallbackConsole::AfterLastFile(CHashBundle &hb)
{
ClosePercents2();

View File

@@ -1072,18 +1072,24 @@ HRESULT ListArchives(CCodecs *codecs,
errorCode = ERROR_FILE_NOT_FOUND;
lastError = HRESULT_FROM_WIN32(lastError);;
g_StdOut.Flush();
*g_ErrStream << endl << kError << NError::MyFormatMessage(errorCode) << endl;
g_ErrStream->NormalizePrint_UString(arcPath);
*g_ErrStream << endl << endl;
if (g_ErrStream)
{
*g_ErrStream << endl << kError << NError::MyFormatMessage(errorCode) << endl;
g_ErrStream->NormalizePrint_UString(arcPath);
*g_ErrStream << endl << endl;
}
numErrors++;
continue;
}
if (fi.IsDir())
{
g_StdOut.Flush();
*g_ErrStream << endl << kError;
g_ErrStream->NormalizePrint_UString(arcPath);
*g_ErrStream << " is not a file" << endl << endl;
if (g_ErrStream)
{
*g_ErrStream << endl << kError;
g_ErrStream->NormalizePrint_UString(arcPath);
*g_ErrStream << " is not a file" << endl << endl;
}
numErrors++;
continue;
}
@@ -1133,24 +1139,28 @@ HRESULT ListArchives(CCodecs *codecs,
{
if (result == E_ABORT)
return result;
g_StdOut.Flush();
*g_ErrStream << endl << kError;
g_ErrStream->NormalizePrint_UString(arcPath);
*g_ErrStream << " : ";
if (result == S_FALSE)
{
Print_OpenArchive_Error(*g_ErrStream, codecs, arcLink);
}
else
{
if (result != S_FALSE)
lastError = result;
*g_ErrStream << "opening : ";
if (result == E_OUTOFMEMORY)
*g_ErrStream << "Can't allocate required memory";
g_StdOut.Flush();
if (g_ErrStream)
{
*g_ErrStream << endl << kError;
g_ErrStream->NormalizePrint_UString(arcPath);
*g_ErrStream << " : ";
if (result == S_FALSE)
{
Print_OpenArchive_Error(*g_ErrStream, codecs, arcLink);
}
else
*g_ErrStream << NError::MyFormatMessage(result);
{
*g_ErrStream << "opening : ";
if (result == E_OUTOFMEMORY)
*g_ErrStream << "Can't allocate required memory";
else
*g_ErrStream << NError::MyFormatMessage(result);
}
*g_ErrStream << endl;
}
*g_ErrStream << endl;
numErrors++;
continue;
}

View File

@@ -24,6 +24,7 @@
#include "../../../Windows/TimeUtils.h"
#include "../Common/ArchiveCommandLine.h"
#include "../Common/Bench.h"
#include "../Common/ExitCode.h"
#include "../Common/Extract.h"
@@ -56,8 +57,6 @@ using namespace NCommandLineParser;
HINSTANCE g_hInstance = 0;
#endif
extern bool g_LargePagesMode;
extern CStdOutStream *g_StdStream;
extern CStdOutStream *g_ErrStream;
@@ -236,7 +235,7 @@ static void PrintWarningsPaths(const CErrorPathCodes &pc, CStdOutStream &so)
{
FOR_VECTOR(i, pc.Paths)
{
so.NormalizePrint_UString(pc.Paths[i]);
so.NormalizePrint_UString(fs2us(pc.Paths[i]));
so << " : ";
so << NError::MyFormatMessage(pc.Codes[i]) << endl;
}
@@ -376,8 +375,13 @@ static void PrintMemUsage(const char *s, UInt64 val)
*g_StdStream << " " << s << " Memory =";
PrintNum(SHIFT_SIZE_VALUE(val, 20), 7);
*g_StdStream << " MB";
if (g_LargePagesMode)
*g_StdStream << " (LP)";
#ifdef _7ZIP_LARGE_PAGES
AString lp;
Add_LargePages_String(lp);
if (!lp.IsEmpty())
*g_StdStream << lp;
#endif
}
EXTERN_C_BEGIN
@@ -911,7 +915,7 @@ int Main2(
{
hashCalc = &hb;
ThrowException_if_Error(hb.SetMethods(EXTERNAL_CODECS_VARS_L options.HashMethods));
hb.Init();
// hb.Init();
}
hresultMain = Extract(