mirror of
https://github.com/Xevion/easy7zip.git
synced 2025-12-08 12:07:03 -06:00
15.07
This commit is contained in:
committed by
Kornel Lesiński
parent
cba375916f
commit
f6444c3256
@@ -216,10 +216,9 @@ void CArchiveExtractCallback::Init(
|
||||
// _progressTotal = 0;
|
||||
// _progressTotal_Defined = false;
|
||||
|
||||
_progressTotal = _packTotal;
|
||||
_progressTotal_Defined = true;
|
||||
|
||||
_packTotal = packSize;
|
||||
_progressTotal = packSize;
|
||||
_progressTotal_Defined = true;
|
||||
|
||||
_extractCallback2 = extractCallback2;
|
||||
_compressProgress.Release();
|
||||
@@ -962,7 +961,12 @@ if (askExtractMode == NArchive::NExtract::NAskMode::kExtract && !_testMode)
|
||||
bool isAnti = false;
|
||||
RINOK(_arc->IsItemAnti(index, isAnti));
|
||||
|
||||
Correct_FsPath(_pathMode == NExtract::NPathMode::kAbsPaths, pathParts, _item.MainIsDir);
|
||||
#ifdef SUPPORT_ALT_STREAMS
|
||||
if (!_item.IsAltStream
|
||||
|| !pathParts.IsEmpty()
|
||||
|| !(_removePartsForAltStreams || _pathMode == NExtract::NPathMode::kNoPathsAlt))
|
||||
#endif
|
||||
Correct_FsPath(_pathMode == NExtract::NPathMode::kAbsPaths, pathParts, _item.MainIsDir);
|
||||
|
||||
#ifdef SUPPORT_ALT_STREAMS
|
||||
|
||||
@@ -970,12 +974,18 @@ if (askExtractMode == NArchive::NExtract::NAskMode::kExtract && !_testMode)
|
||||
{
|
||||
UString s = _item.AltStreamName;
|
||||
Correct_AltStream_Name(s);
|
||||
bool needColon = ((!_removePartsForAltStreams && _pathMode != NExtract::NPathMode::kNoPathsAlt) || !pathParts.IsEmpty());
|
||||
bool needColon = true;
|
||||
|
||||
if (pathParts.IsEmpty())
|
||||
{
|
||||
pathParts.AddNew();
|
||||
if (_pathMode == NExtract::NPathMode::kAbsPaths &&
|
||||
if (_removePartsForAltStreams || _pathMode == NExtract::NPathMode::kNoPathsAlt)
|
||||
needColon = false;
|
||||
}
|
||||
else if (_pathMode == NExtract::NPathMode::kAbsPaths &&
|
||||
NWildcard::GetNumPrefixParts_if_DrivePath(pathParts) == pathParts.Size())
|
||||
pathParts.AddNew();
|
||||
|
||||
UString &name = pathParts.Back();
|
||||
if (needColon)
|
||||
name += (wchar_t)(_ntOptions.ReplaceColonForAltStream ? L'_' : L':');
|
||||
|
||||
@@ -17,7 +17,9 @@ static void ReplaceIncorrectChars(UString &s)
|
||||
if (
|
||||
#ifdef _WIN32
|
||||
c == ':' || c == '*' || c == '?' || c < 0x20 || c == '<' || c == '>' || c == '|' || c == '"'
|
||||
|| c == '/' ||
|
||||
|| c == '/'
|
||||
|| c == 0x202E // RLO
|
||||
||
|
||||
#endif
|
||||
c == WCHAR_PATH_SEPARATOR)
|
||||
s.ReplaceOneCharAtPos(i, '_');
|
||||
@@ -53,7 +55,9 @@ void Correct_AltStream_Name(UString &s)
|
||||
for (unsigned i = 0; i < len; i++)
|
||||
{
|
||||
wchar_t c = s[i];
|
||||
if (c == ':' || c == '\\' || c == '/')
|
||||
if (c == ':' || c == '\\' || c == '/'
|
||||
|| c == 0x202E // RLO
|
||||
)
|
||||
s.ReplaceOneCharAtPos(i, '_');
|
||||
}
|
||||
if (s.IsEmpty())
|
||||
|
||||
@@ -299,6 +299,8 @@ public:
|
||||
UInt64 AvailPhySize; // PhySize, but it's reduced if exceed end of file
|
||||
// bool offsetDefined;
|
||||
|
||||
UInt64 GetEstmatedPhySize() const { return PhySizeDefined ? PhySize : FileSize; }
|
||||
|
||||
UInt64 ArcStreamOffset; // offset of stream that is open by Archive Handler
|
||||
Int64 GetGlobalOffset() const { return ArcStreamOffset + Offset; } // it's global offset of archive
|
||||
|
||||
|
||||
Reference in New Issue
Block a user