mirror of
https://github.com/Xevion/easy7zip.git
synced 2025-12-08 12:07:03 -06:00
Update to 7-Zip Version 21.02
This commit is contained in:
@@ -351,7 +351,7 @@ struct CListStat2
|
||||
AltStreams.Update(st.AltStreams);
|
||||
NumDirs += st.NumDirs;
|
||||
}
|
||||
const UInt64 GetNumStreams() const { return MainFiles.NumFiles + AltStreams.NumFiles; }
|
||||
UInt64 GetNumStreams() const { return MainFiles.NumFiles + AltStreams.NumFiles; }
|
||||
CListStat &GetStat(bool altStreamsMode) { return altStreamsMode ? AltStreams : MainFiles; }
|
||||
};
|
||||
|
||||
@@ -751,7 +751,7 @@ void CFieldPrinter::PrintSum(const CListStat2 &stat2)
|
||||
PrintSum(stat2.MainFiles, stat2.NumDirs, kString_Files);
|
||||
if (stat2.AltStreams.NumFiles != 0)
|
||||
{
|
||||
PrintSum(stat2.AltStreams, 0, kString_AltStreams);;
|
||||
PrintSum(stat2.AltStreams, 0, kString_AltStreams);
|
||||
CListStat st = stat2.MainFiles;
|
||||
st.Update(stat2.AltStreams);
|
||||
PrintSum(st, 0, kString_Streams);
|
||||
@@ -905,7 +905,7 @@ static HRESULT PrintArcProp(CStdOutStream &so, IInArchive *archive, PROPID propI
|
||||
static void PrintArcTypeError(CStdOutStream &so, const UString &type, bool isWarning)
|
||||
{
|
||||
so << "Open " << (isWarning ? "WARNING" : "ERROR")
|
||||
<< ": Can not open the file as ["
|
||||
<< ": Cannot open the file as ["
|
||||
<< type
|
||||
<< "] archive"
|
||||
<< endl;
|
||||
@@ -926,6 +926,7 @@ static void ErrorInfo_Print(CStdOutStream &so, const CArcErrorInfo &er)
|
||||
PrintPropPair(so, "WARNING", er.WarningMessage, true);
|
||||
}
|
||||
|
||||
HRESULT Print_OpenArchive_Props(CStdOutStream &so, const CCodecs *codecs, const CArchiveLink &arcLink);
|
||||
HRESULT Print_OpenArchive_Props(CStdOutStream &so, const CCodecs *codecs, const CArchiveLink &arcLink)
|
||||
{
|
||||
FOR_VECTOR (r, arcLink.Arcs)
|
||||
@@ -990,11 +991,12 @@ HRESULT Print_OpenArchive_Props(CStdOutStream &so, const CCodecs *codecs, const
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT Print_OpenArchive_Error(CStdOutStream &so, const CCodecs *codecs, const CArchiveLink &arcLink);
|
||||
HRESULT Print_OpenArchive_Error(CStdOutStream &so, const CCodecs *codecs, const CArchiveLink &arcLink)
|
||||
{
|
||||
#ifndef _NO_CRYPTO
|
||||
if (arcLink.PasswordWasAsked)
|
||||
so << "Can not open encrypted archive. Wrong password?";
|
||||
so << "Cannot open encrypted archive. Wrong password?";
|
||||
else
|
||||
#endif
|
||||
{
|
||||
@@ -1002,10 +1004,10 @@ HRESULT Print_OpenArchive_Error(CStdOutStream &so, const CCodecs *codecs, const
|
||||
{
|
||||
so.NormalizePrint_UString(arcLink.NonOpen_ArcPath);
|
||||
so << endl;
|
||||
PrintArcTypeError(so, codecs->Formats[arcLink.NonOpen_ErrorInfo.ErrorFormatIndex].Name, false);
|
||||
PrintArcTypeError(so, codecs->Formats[(unsigned)arcLink.NonOpen_ErrorInfo.ErrorFormatIndex].Name, false);
|
||||
}
|
||||
else
|
||||
so << "Can not open the file as archive";
|
||||
so << "Cannot open the file as archive";
|
||||
}
|
||||
|
||||
so << endl;
|
||||
@@ -1065,12 +1067,12 @@ HRESULT ListArchives(CCodecs *codecs,
|
||||
if (!stdInMode)
|
||||
{
|
||||
NFile::NFind::CFileInfo fi;
|
||||
if (!fi.Find(us2fs(arcPath)))
|
||||
if (!fi.Find_FollowLink(us2fs(arcPath)))
|
||||
{
|
||||
DWORD errorCode = GetLastError();
|
||||
if (errorCode == 0)
|
||||
errorCode = ERROR_FILE_NOT_FOUND;
|
||||
lastError = HRESULT_FROM_WIN32(lastError);;
|
||||
lastError = HRESULT_FROM_WIN32(errorCode);
|
||||
g_StdOut.Flush();
|
||||
if (g_ErrStream)
|
||||
{
|
||||
@@ -1279,7 +1281,7 @@ HRESULT ListArchives(CCodecs *codecs,
|
||||
}
|
||||
else
|
||||
{
|
||||
SplitPathToParts(fp.FilePath, pathParts);;
|
||||
SplitPathToParts(fp.FilePath, pathParts);
|
||||
bool include;
|
||||
if (!wildcardCensor.CheckPathVect(pathParts, !fp.IsDir, include))
|
||||
continue;
|
||||
@@ -1331,7 +1333,7 @@ HRESULT ListArchives(CCodecs *codecs,
|
||||
{
|
||||
g_StdOut << "----------\n";
|
||||
PrintPropPair(g_StdOut, "Path", arcLink.NonOpen_ArcPath, false);
|
||||
PrintArcTypeError(g_StdOut, codecs->Formats[arcLink.NonOpen_ErrorInfo.ErrorFormatIndex].Name, false);
|
||||
PrintArcTypeError(g_StdOut, codecs->Formats[(unsigned)arcLink.NonOpen_ErrorInfo.ErrorFormatIndex].Name, false);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user