mirror of
https://github.com/Xevion/easy7zip.git
synced 2025-12-10 02:07:07 -06:00
15.08
This commit is contained in:
committed by
Kornel Lesiński
parent
f6444c3256
commit
6543c28020
@@ -271,7 +271,7 @@ HRESULT CAddCommon::Compress(
|
||||
else
|
||||
{
|
||||
CMethodId methodId;
|
||||
switch(method)
|
||||
switch (method)
|
||||
{
|
||||
case NFileHeader::NCompressionMethod::kBZip2:
|
||||
methodId = kMethodId_BZip2;
|
||||
|
||||
@@ -929,7 +929,7 @@ STDMETHODIMP CHandler::Extract(const UInt32 *indices, UInt32 numItems,
|
||||
bool allFilesMode = (numItems == (UInt32)(Int32)-1);
|
||||
if (allFilesMode)
|
||||
numItems = m_Items.Size();
|
||||
if(numItems == 0)
|
||||
if (numItems == 0)
|
||||
return S_OK;
|
||||
UInt32 i;
|
||||
for (i = 0; i < numItems; i++)
|
||||
|
||||
@@ -153,36 +153,7 @@ namespace NFileHeader
|
||||
};
|
||||
}
|
||||
|
||||
namespace NUnixAttrib
|
||||
{
|
||||
const UInt32 kIFMT = 0170000; // file type mask
|
||||
|
||||
const UInt32 kIFDIR = 0040000; // directory
|
||||
const UInt32 kIFREG = 0100000; // regular file
|
||||
const UInt32 kIFSOCK = 0140000; // socket (BSD, not SysV or Amiga)
|
||||
const UInt32 kIFLNK = 0120000; // symbolic link (not SysV, Amiga)
|
||||
const UInt32 kIFBLK = 0060000; // block special (not Amiga)
|
||||
const UInt32 kIFCHR = 0020000; // character special (not Amiga)
|
||||
const UInt32 kIFIFO = 0010000; // fifo (BCC, not MSC or Amiga)
|
||||
|
||||
const UInt32 kISUID = 04000; // set user id on execution
|
||||
const UInt32 kISGID = 02000; // set group id on execution
|
||||
const UInt32 kISVTX = 01000; // directory permissions control
|
||||
const UInt32 kENFMT = kISGID; // record locking enforcement flag
|
||||
const UInt32 kIRWXU = 00700; // read, write, execute: owner
|
||||
const UInt32 kIRUSR = 00400; // read permission: owner
|
||||
const UInt32 kIWUSR = 00200; // write permission: owner
|
||||
const UInt32 kIXUSR = 00100; // execute permission: owner
|
||||
const UInt32 kIRWXG = 00070; // read, write, execute: group
|
||||
const UInt32 kIRGRP = 00040; // read permission: group
|
||||
const UInt32 kIWGRP = 00020; // write permission: group
|
||||
const UInt32 kIXGRP = 00010; // execute permission: group
|
||||
const UInt32 kIRWXO = 00007; // read, write, execute: other
|
||||
const UInt32 kIROTH = 00004; // read permission: other
|
||||
const UInt32 kIWOTH = 00002; // write permission: other
|
||||
const UInt32 kIXOTH = 00001; // execute permission: other
|
||||
}
|
||||
|
||||
|
||||
namespace NAmigaAttrib
|
||||
{
|
||||
const UInt32 kIFMT = 06000; // Amiga file type mask
|
||||
|
||||
@@ -579,7 +579,7 @@ static bool FlagsAreSame(const CItem &i1, const CItem &i2)
|
||||
if (i1.Flags == i2.Flags)
|
||||
return true;
|
||||
UInt32 mask = 0xFFFF;
|
||||
switch(i1.Method)
|
||||
switch (i1.Method)
|
||||
{
|
||||
case NFileHeader::NCompressionMethod::kDeflated:
|
||||
mask = 0x7FF9;
|
||||
|
||||
@@ -2,11 +2,14 @@
|
||||
|
||||
#include "StdAfx.h"
|
||||
|
||||
#include "ZipHeader.h"
|
||||
#include "ZipItem.h"
|
||||
#include "../Common/ItemNameUtils.h"
|
||||
#include "../../../../C/CpuArch.h"
|
||||
|
||||
#include "../../../Common/MyLinux.h"
|
||||
|
||||
#include "../Common/ItemNameUtils.h"
|
||||
|
||||
#include "ZipItem.h"
|
||||
|
||||
namespace NArchive {
|
||||
namespace NZip {
|
||||
|
||||
@@ -114,7 +117,7 @@ bool CItem::IsDir() const
|
||||
case NHostOS::kMVS:
|
||||
return false; // change it throw kUnknownAttributes;
|
||||
case NHostOS::kUnix:
|
||||
return ((highAttrib & NUnixAttrib::kIFMT) == NUnixAttrib::kIFDIR);
|
||||
return MY_LIN_S_ISDIR(highAttrib);
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
@@ -151,7 +154,7 @@ bool CItem::GetPosixAttrib(UInt32 &attrib) const
|
||||
}
|
||||
attrib = 0;
|
||||
if (IsDir())
|
||||
attrib = NUnixAttrib::kIFDIR;
|
||||
attrib = MY_LIN_S_IFDIR;
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user