mirror of
https://github.com/Xevion/easy7zip.git
synced 2025-12-06 15:14:59 -06:00
Update to 7-Zip Version 21.02
This commit is contained in:
@@ -8,6 +8,7 @@
|
||||
|
||||
#include "../../Common/FileStreams.h"
|
||||
#include "../../Common/StreamUtils.h"
|
||||
#include "../../Common/StreamObjects.h"
|
||||
|
||||
#ifdef WANT_OPTIONAL_LOWERCASE
|
||||
#include "../FileManager/RegistryUtils.h"
|
||||
@@ -215,6 +216,8 @@ HRESULT HashCalc(
|
||||
else
|
||||
{
|
||||
RINOK(callback->StartScanning());
|
||||
|
||||
dirItems.SymLinks = options.SymLinks.Val;
|
||||
dirItems.ScanAltStreams = options.AltStreamsMode;
|
||||
|
||||
HRESULT res = EnumerateItems(censor,
|
||||
@@ -262,31 +265,47 @@ HRESULT HashCalc(
|
||||
UString path;
|
||||
bool isDir = false;
|
||||
bool isAltStream = false;
|
||||
|
||||
if (options.StdInMode)
|
||||
{
|
||||
inStream = new CStdInFileStream;
|
||||
}
|
||||
else
|
||||
{
|
||||
CInFileStream *inStreamSpec = new CInFileStream;
|
||||
inStream = inStreamSpec;
|
||||
const CDirItem &dirItem = dirItems.Items[i];
|
||||
isDir = dirItem.IsDir();
|
||||
isAltStream = dirItem.IsAltStream;
|
||||
path = dirItems.GetLogPath(i);
|
||||
if (!isDir)
|
||||
const CDirItem &di = dirItems.Items[i];
|
||||
isAltStream = di.IsAltStream;
|
||||
|
||||
#ifndef UNDER_CE
|
||||
// if (di.AreReparseData())
|
||||
if (di.ReparseData.Size() != 0)
|
||||
{
|
||||
FString phyPath = dirItems.GetPhyPath(i);
|
||||
if (!inStreamSpec->OpenShared(phyPath, options.OpenShareForWrite))
|
||||
CBufInStream *inStreamSpec = new CBufInStream();
|
||||
inStream = inStreamSpec;
|
||||
inStreamSpec->Init(di.ReparseData, di.ReparseData.Size());
|
||||
}
|
||||
else
|
||||
#endif
|
||||
{
|
||||
CInFileStream *inStreamSpec = new CInFileStream;
|
||||
inStreamSpec->File.PreserveATime = options.PreserveATime;
|
||||
inStream = inStreamSpec;
|
||||
isDir = di.IsDir();
|
||||
if (!isDir)
|
||||
{
|
||||
HRESULT res = callback->OpenFileError(phyPath, ::GetLastError());
|
||||
hb.NumErrors++;
|
||||
if (res != S_FALSE)
|
||||
return res;
|
||||
continue;
|
||||
const FString phyPath = dirItems.GetPhyPath(i);
|
||||
if (!inStreamSpec->OpenShared(phyPath, options.OpenShareForWrite))
|
||||
{
|
||||
HRESULT res = callback->OpenFileError(phyPath, ::GetLastError());
|
||||
hb.NumErrors++;
|
||||
if (res != S_FALSE)
|
||||
return res;
|
||||
continue;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
RINOK(callback->GetStream(path, isDir));
|
||||
UInt64 fileSize = 0;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user