mirror of
https://github.com/Xevion/easy7zip.git
synced 2025-12-09 06:07:05 -06:00
16.00
This commit is contained in:
committed by
Kornel Lesiński
parent
c20d013055
commit
66ac98bb02
@@ -1053,7 +1053,7 @@ void CArcCmdLineParser::Parse2(CArcCmdLineOptions &options)
|
||||
const UStringVector &nonSwitchStrings = parser.NonSwitchStrings;
|
||||
unsigned numNonSwitchStrings = nonSwitchStrings.Size();
|
||||
if (numNonSwitchStrings < kMinNonSwitchWords)
|
||||
throw CArcCmdLineException("The command must be spcified");
|
||||
throw CArcCmdLineException("The command must be specified");
|
||||
|
||||
if (!ParseArchiveCommand(nonSwitchStrings[kCommandIndex], options.Command))
|
||||
throw CArcCmdLineException("Unsupported command:", nonSwitchStrings[kCommandIndex]);
|
||||
|
||||
@@ -43,6 +43,7 @@ STDMETHODIMP COpenCallbackImp::GetProperty(PROPID propID, PROPVARIANT *value)
|
||||
switch (propID)
|
||||
{
|
||||
case kpidName: prop = _subArchiveName; break;
|
||||
// case kpidSize: prop = _subArchiveSize; break; // we don't use it now
|
||||
}
|
||||
else
|
||||
switch (propID)
|
||||
|
||||
@@ -1632,6 +1632,36 @@ HRESULT CArc::OpenStream2(const COpenOptions &op)
|
||||
#endif
|
||||
|
||||
{
|
||||
#ifndef _SFX
|
||||
|
||||
bool isZip = false;
|
||||
bool isRar = false;
|
||||
|
||||
const wchar_t c = extension[0];
|
||||
if (c == 'z' || c == 'Z' || c == 'r' || c == 'R')
|
||||
{
|
||||
bool isNumber = false;
|
||||
for (unsigned k = 1;; k++)
|
||||
{
|
||||
const wchar_t d = extension[k];
|
||||
if (d == 0)
|
||||
break;
|
||||
if (d < '0' || d > '9')
|
||||
{
|
||||
isNumber = false;
|
||||
break;
|
||||
}
|
||||
isNumber = true;
|
||||
}
|
||||
if (isNumber)
|
||||
if (c == 'z' || c == 'Z')
|
||||
isZip = true;
|
||||
else
|
||||
isRar = true;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
FOR_VECTOR (i, op.codecs->Formats)
|
||||
{
|
||||
const CArcInfoEx &ai = op.codecs->Formats[i];
|
||||
@@ -1647,7 +1677,12 @@ HRESULT CArc::OpenStream2(const COpenOptions &op)
|
||||
isPrearcExt = true;
|
||||
#endif
|
||||
|
||||
if (ai.FindExtension(extension) >= 0)
|
||||
if (ai.FindExtension(extension) >= 0
|
||||
#ifndef _SFX
|
||||
|| isZip && StringsAreEqualNoCase_Ascii(ai.Name, "zip")
|
||||
|| isRar && StringsAreEqualNoCase_Ascii(ai.Name, "rar")
|
||||
#endif
|
||||
)
|
||||
{
|
||||
// PrintNumber("orderIndices.Insert", i);
|
||||
orderIndices.Insert(numFinded++, i);
|
||||
|
||||
@@ -98,6 +98,8 @@ void CInfo::Load()
|
||||
OverwriteMode = NOverwriteMode::kAsk;
|
||||
OverwriteMode_Force = false;
|
||||
|
||||
SplitDest.Val = true;
|
||||
|
||||
Paths.Clear();
|
||||
|
||||
CS_LOCK
|
||||
|
||||
Reference in New Issue
Block a user