mirror of
https://github.com/Xevion/easy7zip.git
synced 2025-12-11 02:07:09 -06:00
22.00
This commit is contained in:
24
CPP/7zip/Archive/Iso/IsoHandler.cpp
Normal file → Executable file
24
CPP/7zip/Archive/Iso/IsoHandler.cpp
Normal file → Executable file
@@ -6,9 +6,6 @@
|
||||
#include "../../../Common/MyLinux.h"
|
||||
#include "../../../Common/StringConvert.h"
|
||||
|
||||
#include "../../../Windows/PropVariant.h"
|
||||
#include "../../../Windows/TimeUtils.h"
|
||||
|
||||
#include "../../Common/LimitedStreams.h"
|
||||
#include "../../Common/ProgressUtils.h"
|
||||
|
||||
@@ -34,8 +31,8 @@ static const Byte kProps[] =
|
||||
// kpidCTime,
|
||||
// kpidATime,
|
||||
kpidPosixAttrib,
|
||||
// kpidUser,
|
||||
// kpidGroup,
|
||||
// kpidUserId,
|
||||
// kpidGroupId,
|
||||
// kpidLinks,
|
||||
kpidSymLink
|
||||
};
|
||||
@@ -127,8 +124,8 @@ STDMETHODIMP CHandler::GetArchiveProperty(PROPID propID, PROPVARIANT *value)
|
||||
prop = s;
|
||||
break;
|
||||
}
|
||||
case kpidCTime: { FILETIME utc; if (vol.CTime.GetFileTime(utc)) prop = utc; break; }
|
||||
case kpidMTime: { FILETIME utc; if (vol.MTime.GetFileTime(utc)) prop = utc; break; }
|
||||
case kpidCTime: { vol.CTime.GetFileTime(prop); break; }
|
||||
case kpidMTime: { vol.MTime.GetFileTime(prop); break; }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -242,8 +239,8 @@ STDMETHODIMP CHandler::GetProperty(UInt32 index, PROPID propID, PROPVARIANT *val
|
||||
case kpidPosixAttrib:
|
||||
/*
|
||||
case kpidLinks:
|
||||
case kpidUser:
|
||||
case kpidGroup:
|
||||
case kpidUserId:
|
||||
case kpidGroupId:
|
||||
*/
|
||||
{
|
||||
if (_archive.IsSusp)
|
||||
@@ -254,8 +251,8 @@ STDMETHODIMP CHandler::GetProperty(UInt32 index, PROPID propID, PROPVARIANT *val
|
||||
case kpidPosixAttrib: t = k_Px_Mode; break;
|
||||
/*
|
||||
case kpidLinks: t = k_Px_Links; break;
|
||||
case kpidUser: t = k_Px_User; break;
|
||||
case kpidGroup: t = k_Px_Group; break;
|
||||
case kpidUserId: t = k_Px_User; break;
|
||||
case kpidGroupId: t = k_Px_Group; break;
|
||||
*/
|
||||
}
|
||||
UInt32 v;
|
||||
@@ -276,9 +273,8 @@ STDMETHODIMP CHandler::GetProperty(UInt32 index, PROPID propID, PROPVARIANT *val
|
||||
// case kpidCTime:
|
||||
// case kpidATime:
|
||||
{
|
||||
FILETIME utc;
|
||||
if (/* propID == kpidMTime && */ item.DateTime.GetFileTime(utc))
|
||||
prop = utc;
|
||||
// if
|
||||
item.DateTime.GetFileTime(prop);
|
||||
/*
|
||||
else
|
||||
{
|
||||
|
||||
0
CPP/7zip/Archive/Iso/IsoHandler.h
Normal file → Executable file
0
CPP/7zip/Archive/Iso/IsoHandler.h
Normal file → Executable file
0
CPP/7zip/Archive/Iso/IsoHeader.cpp
Normal file → Executable file
0
CPP/7zip/Archive/Iso/IsoHeader.cpp
Normal file → Executable file
0
CPP/7zip/Archive/Iso/IsoHeader.h
Normal file → Executable file
0
CPP/7zip/Archive/Iso/IsoHeader.h
Normal file → Executable file
2
CPP/7zip/Archive/Iso/IsoIn.cpp
Normal file → Executable file
2
CPP/7zip/Archive/Iso/IsoIn.cpp
Normal file → Executable file
@@ -587,6 +587,8 @@ HRESULT CInArchive::Open2()
|
||||
for (MainVolDescIndex = VolDescs.Size() - 1; MainVolDescIndex > 0; MainVolDescIndex--)
|
||||
if (VolDescs[MainVolDescIndex].IsJoliet())
|
||||
break;
|
||||
/* FIXME: some volume can contain Rock Ridge, that is better than
|
||||
Joliet volume. So we need some way to detect such case */
|
||||
// MainVolDescIndex = 0; // to read primary volume
|
||||
const CVolumeDescriptor &vd = VolDescs[MainVolDescIndex];
|
||||
if (vd.LogicalBlockSize != kBlockSize)
|
||||
|
||||
15
CPP/7zip/Archive/Iso/IsoIn.h
Normal file → Executable file
15
CPP/7zip/Archive/Iso/IsoIn.h
Normal file → Executable file
@@ -127,17 +127,18 @@ struct CDateTime
|
||||
bool NotSpecified() const { return Year == 0 && Month == 0 && Day == 0 &&
|
||||
Hour == 0 && Minute == 0 && Second == 0 && GmtOffset == 0; }
|
||||
|
||||
bool GetFileTime(FILETIME &ft) const
|
||||
bool GetFileTime(NWindows::NCOM::CPropVariant &prop) const
|
||||
{
|
||||
UInt64 value;
|
||||
bool res = NWindows::NTime::GetSecondsSince1601(Year, Month, Day, Hour, Minute, Second, value);
|
||||
UInt64 v;
|
||||
const bool res = NWindows::NTime::GetSecondsSince1601(Year, Month, Day, Hour, Minute, Second, v);
|
||||
if (res)
|
||||
{
|
||||
value -= (Int64)((Int32)GmtOffset * 15 * 60);
|
||||
value *= 10000000;
|
||||
v -= (Int64)((Int32)GmtOffset * 15 * 60);
|
||||
v *= 10000000;
|
||||
if (Hundredths < 100)
|
||||
v += (UInt32)Hundredths * 100000;
|
||||
prop.SetAsTimeFrom_Ft64_Prec(v, k_PropVar_TimePrec_Base + 2);
|
||||
}
|
||||
ft.dwLowDateTime = (DWORD)value;
|
||||
ft.dwHighDateTime = (DWORD)(value >> 32);
|
||||
return res;
|
||||
}
|
||||
};
|
||||
|
||||
13
CPP/7zip/Archive/Iso/IsoItem.h
Normal file → Executable file
13
CPP/7zip/Archive/Iso/IsoItem.h
Normal file → Executable file
@@ -25,17 +25,16 @@ struct CRecordingDateTime
|
||||
Byte Second;
|
||||
signed char GmtOffset; // min intervals from -48 (West) to +52 (East) recorded.
|
||||
|
||||
bool GetFileTime(FILETIME &ft) const
|
||||
bool GetFileTime(NWindows::NCOM::CPropVariant &prop) const
|
||||
{
|
||||
UInt64 value;
|
||||
bool res = NWindows::NTime::GetSecondsSince1601(Year + 1900, Month, Day, Hour, Minute, Second, value);
|
||||
UInt64 v;
|
||||
const bool res = NWindows::NTime::GetSecondsSince1601(Year + 1900, Month, Day, Hour, Minute, Second, v);
|
||||
if (res)
|
||||
{
|
||||
value -= (Int64)((Int32)GmtOffset * 15 * 60);
|
||||
value *= 10000000;
|
||||
v -= (Int64)((Int32)GmtOffset * 15 * 60);
|
||||
v *= 10000000;
|
||||
prop.SetAsTimeFrom_Ft64_Prec(v, k_PropVar_TimePrec_Base);
|
||||
}
|
||||
ft.dwLowDateTime = (DWORD)value;
|
||||
ft.dwHighDateTime = (DWORD)(value >> 32);
|
||||
return res;
|
||||
}
|
||||
};
|
||||
|
||||
0
CPP/7zip/Archive/Iso/IsoRegister.cpp
Normal file → Executable file
0
CPP/7zip/Archive/Iso/IsoRegister.cpp
Normal file → Executable file
0
CPP/7zip/Archive/Iso/StdAfx.h
Normal file → Executable file
0
CPP/7zip/Archive/Iso/StdAfx.h
Normal file → Executable file
Reference in New Issue
Block a user