mirror of
https://github.com/Xevion/easy7zip.git
synced 2025-12-06 09:14:58 -06:00
16.04
This commit is contained in:
committed by
Kornel Lesiński
parent
232ce79574
commit
603abd5528
@@ -231,6 +231,18 @@ bool CItem::Is_CopyLink() const
|
||||
return FindExtra_Link(link) && link.Type == NLinkType::kFileCopy;
|
||||
}
|
||||
|
||||
bool CItem::Is_HardLink() const
|
||||
{
|
||||
CLinkInfo link;
|
||||
return FindExtra_Link(link) && link.Type == NLinkType::kHardLink;
|
||||
}
|
||||
|
||||
bool CItem::Is_CopyLink_or_HardLink() const
|
||||
{
|
||||
CLinkInfo link;
|
||||
return FindExtra_Link(link) && (link.Type == NLinkType::kFileCopy || link.Type == NLinkType::kHardLink);
|
||||
}
|
||||
|
||||
void CItem::Link_to_Prop(unsigned linkType, NWindows::NCOM::CPropVariant &prop) const
|
||||
{
|
||||
CLinkInfo link;
|
||||
@@ -2587,7 +2599,7 @@ STDMETHODIMP CHandler::Extract(const UInt32 *indices, UInt32 numItems,
|
||||
{
|
||||
if (testMode)
|
||||
{
|
||||
if (item->Is_CopyLink() && item->PackSize == 0)
|
||||
if (item->NeedUse_as_CopyLink_or_HardLink())
|
||||
{
|
||||
RINOK(extractCallback->PrepareOperation(askMode));
|
||||
RINOK(extractCallback->SetOperationResult(NExtract::NOperationResult::kOK));
|
||||
@@ -2599,6 +2611,9 @@ STDMETHODIMP CHandler::Extract(const UInt32 *indices, UInt32 numItems,
|
||||
if (item->IsService())
|
||||
continue;
|
||||
|
||||
if (item->NeedUse_as_HardLink())
|
||||
continue;
|
||||
|
||||
bool needDecode = false;
|
||||
|
||||
for (unsigned n = i + 1; n < _refs.Size(); n++)
|
||||
@@ -2639,7 +2654,7 @@ STDMETHODIMP CHandler::Extract(const UInt32 *indices, UInt32 numItems,
|
||||
continue;
|
||||
}
|
||||
|
||||
if (item->Is_CopyLink() && item->PackSize == 0)
|
||||
if (item->NeedUse_as_CopyLink())
|
||||
{
|
||||
RINOK(extractCallback->SetOperationResult(
|
||||
realOutStream ?
|
||||
|
||||
@@ -262,8 +262,12 @@ struct CItem
|
||||
bool FindExtra_Link(CLinkInfo &link) const;
|
||||
void Link_to_Prop(unsigned linkType, NWindows::NCOM::CPropVariant &prop) const;
|
||||
bool Is_CopyLink() const;
|
||||
bool Is_HardLink() const;
|
||||
bool Is_CopyLink_or_HardLink() const;
|
||||
|
||||
bool NeedUse_as_CopyLink() const { return PackSize == 0 && Is_CopyLink(); }
|
||||
bool NeedUse_as_HardLink() const { return PackSize == 0 && Is_HardLink(); }
|
||||
bool NeedUse_as_CopyLink_or_HardLink() const { return PackSize == 0 && Is_CopyLink_or_HardLink(); }
|
||||
|
||||
bool GetAltStreamName(AString &name) const;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user