mirror of
https://github.com/Xevion/easy7zip.git
synced 2025-12-14 16:11:38 -06:00
4.20
This commit is contained in:
committed by
Kornel Lesiński
parent
8c1b5c7b7e
commit
3c510ba80b
@@ -1,7 +1,5 @@
|
||||
// Archive/Tar/Item.h
|
||||
|
||||
#pragma once
|
||||
|
||||
#ifndef __ARCHIVE_TAR_ITEM_H
|
||||
#define __ARCHIVE_TAR_ITEM_H
|
||||
|
||||
@@ -9,6 +7,8 @@
|
||||
|
||||
#include "Common/Types.h"
|
||||
#include "Common/String.h"
|
||||
|
||||
#include "../Common/ItemNameUtils.h"
|
||||
#include "TarHeader.h"
|
||||
|
||||
namespace NArchive {
|
||||
@@ -18,11 +18,11 @@ class CItem
|
||||
{
|
||||
public:
|
||||
AString Name;
|
||||
UINT32 Mode;
|
||||
UINT32 UID;
|
||||
UINT32 GID;
|
||||
UINT64 Size;
|
||||
time_t ModificationTime;
|
||||
UInt32 Mode;
|
||||
UInt32 UID;
|
||||
UInt32 GID;
|
||||
UInt64 Size;
|
||||
UInt32 ModificationTime;
|
||||
char LinkFlag;
|
||||
AString LinkName;
|
||||
char Magic[8];
|
||||
@@ -30,9 +30,9 @@ public:
|
||||
AString GroupName;
|
||||
|
||||
bool DeviceMajorDefined;
|
||||
UINT32 DeviceMajor;
|
||||
UInt32 DeviceMajor;
|
||||
bool DeviceMinorDefined;
|
||||
UINT32 DeviceMinor;
|
||||
UInt32 DeviceMinor;
|
||||
|
||||
bool IsDirectory() const
|
||||
{
|
||||
@@ -41,13 +41,7 @@ public:
|
||||
if (LinkFlag == NFileHeader::NLinkFlag::kOldNormal ||
|
||||
LinkFlag == NFileHeader::NLinkFlag::kNormal)
|
||||
{
|
||||
if (Name.IsEmpty())
|
||||
return false;
|
||||
#ifdef WIN32
|
||||
return (*CharPrevExA(CP_OEMCP, Name, &Name[Name.Length()], 0) == '/');
|
||||
#else
|
||||
return (Name[Name.Length() - 1) == '/');
|
||||
#endif
|
||||
return NItemName::HasTailSlash(Name, CP_OEMCP);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
@@ -56,10 +50,10 @@ public:
|
||||
class CItemEx: public CItem
|
||||
{
|
||||
public:
|
||||
UINT64 HeaderPosition;
|
||||
UINT64 LongLinkSize;
|
||||
UINT64 GetDataPosition() const { return HeaderPosition + LongLinkSize + NFileHeader::kRecordSize; };
|
||||
UINT64 GetFullSize() const { return LongLinkSize + NFileHeader::kRecordSize + Size; };
|
||||
UInt64 HeaderPosition;
|
||||
UInt64 LongLinkSize;
|
||||
UInt64 GetDataPosition() const { return HeaderPosition + LongLinkSize + NFileHeader::kRecordSize; };
|
||||
UInt64 GetFullSize() const { return LongLinkSize + NFileHeader::kRecordSize + Size; };
|
||||
};
|
||||
|
||||
}}
|
||||
|
||||
Reference in New Issue
Block a user