This commit is contained in:
Igor Pavlov
2017-08-29 20:49:43 +01:00
committed by Kornel
parent 2efa10565a
commit b5dc853b24
110 changed files with 4714 additions and 1700 deletions

View File

@@ -114,6 +114,39 @@ void Print_DirItemsStat(AString &s, const CDirItemsStat &st)
}
}
void Print_DirItemsStat2(AString &s, const CDirItemsStat2 &st)
{
Print_DirItemsStat(s, (CDirItemsStat &)st);
bool needLF = true;
if (st.Anti_NumDirs != 0)
{
if (needLF)
s.Add_LF();
needLF = false;
Print_UInt64_and_String(s, st.Anti_NumDirs, st.Anti_NumDirs == 1 ? "anti-folder" : "anti-folders");
}
if (st.Anti_NumFiles != 0)
{
if (needLF)
s.Add_LF();
else
s += ", ";
needLF = false;
Print_UInt64_and_String(s, st.Anti_NumFiles, st.Anti_NumFiles == 1 ? "anti-file" : "anti-files");
}
if (st.Anti_NumAltStreams != 0)
{
if (needLF)
s.Add_LF();
else
s += ", ";
needLF = false;
Print_UInt64_and_String(s, st.Anti_NumAltStreams, "anti-alternate-streams");
}
}
void CExtractScanConsole::PrintStat(const CDirItemsStat &st)
{
if (_so)

View File

@@ -97,7 +97,6 @@ static const char * const kHelpString =
#endif
#endif
" <command> [<switches>...] <archive_name> [<file_names>...]\n"
" [<@listfiles...>]\n"
"\n"
"<Commands>\n"
" a : Add files to archive\n"
@@ -114,6 +113,7 @@ static const char * const kHelpString =
"\n"
"<Switches>\n"
" -- : Stop switches parsing\n"
" @listfile : set path to listfile that contains file names\n"
" -ai[r[-|0]]{@listfile|!wildcard} : Include archives\n"
" -ax[r[-|0]]{@listfile|!wildcard} : eXclude archives\n"
" -ao{a|s|t|u} : set Overwrite mode\n"
@@ -548,6 +548,7 @@ int Main2(
if (options.LargePages)
{
SetLargePageSize();
// note: this process also can inherit that Privilege from parent process
g_LargePagesMode =
#if defined(_WIN32) && !defined(UNDER_CE)
NSecurity::EnablePrivilege_LockMemory();

View File

@@ -241,6 +241,7 @@ static void PrintPropPair(AString &s, const char *name, UInt64 val)
void PrintSize_bytes_Smart(AString &s, UInt64 val);
void Print_DirItemsStat(AString &s, const CDirItemsStat &st);
void Print_DirItemsStat2(AString &s, const CDirItemsStat2 &st);
HRESULT CUpdateCallbackConsole::FinishScanning(const CDirItemsStat &st)
{
@@ -399,10 +400,10 @@ HRESULT CUpdateCallbackConsole::Finalize()
*/
void static PrintToDoStat(CStdOutStream *_so, const CDirItemsStat &stat, const char *name)
void static PrintToDoStat(CStdOutStream *_so, const CDirItemsStat2 &stat, const char *name)
{
AString s;
Print_DirItemsStat(s, stat);
Print_DirItemsStat2(s, stat);
*_so << name << ": " << s << endl;
}