mirror of
https://github.com/Xevion/easy7zip.git
synced 2025-12-08 14:07:00 -06:00
21.04
This commit is contained in:
@@ -130,6 +130,7 @@ STDMETHODIMP CExtractCallbackImp::AskOverwrite(
|
||||
static const char * const kTestString = "Testing";
|
||||
static const char * const kExtractString = "Extracting";
|
||||
static const char * const kSkipString = "Skipping";
|
||||
static const char * const kReadString = "Reading";
|
||||
|
||||
STDMETHODIMP CExtractCallbackImp::PrepareOperation(const wchar_t *name, Int32 /* isFolder */, Int32 askExtractMode, const UInt64 * /* position */)
|
||||
{
|
||||
@@ -143,6 +144,7 @@ STDMETHODIMP CExtractCallbackImp::PrepareOperation(const wchar_t *name, Int32 /*
|
||||
case NArchive::NExtract::NAskMode::kExtract: s = kExtractString; break;
|
||||
case NArchive::NExtract::NAskMode::kTest: s = kTestString; break;
|
||||
case NArchive::NExtract::NAskMode::kSkip: s = kSkipString; break;
|
||||
case NArchive::NExtract::NAskMode::kReadExternal: s = kReadString; break;
|
||||
default: s = "???"; // return E_FAIL;
|
||||
};
|
||||
|
||||
|
||||
@@ -118,6 +118,14 @@ SOURCE=..\..\..\Common\CRC.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\..\Common\DynLimBuf.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\..\Common\DynLimBuf.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\..\Common\IntToString.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
@@ -430,6 +438,14 @@ SOURCE=..\Common\HandlerLoader.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\Common\HashCalc.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\Common\HashCalc.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\Common\LoadCodecs.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
@@ -622,6 +638,14 @@ SOURCE=..\..\Common\LimitedStreams.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\Common\MethodProps.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\Common\MethodProps.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\Common\ProgressUtils.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
@@ -712,6 +736,14 @@ SOURCE=..\..\..\..\C\Threads.h
|
||||
# PROP Default_Filter ""
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\Archive\Common\ItemNameUtils.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\Archive\Common\ItemNameUtils.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\Archive\Common\OutStreamWithCRC.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
@@ -686,9 +686,14 @@ struct CArchiveItemProperty
|
||||
VARTYPE Type;
|
||||
};
|
||||
|
||||
static inline char GetHex(Byte value)
|
||||
static inline char GetHex_Upper(unsigned v)
|
||||
{
|
||||
return (char)((value < 10) ? ('0' + value) : ('A' + (value - 10)));
|
||||
return (char)((v < 10) ? ('0' + v) : ('A' + (v - 10)));
|
||||
}
|
||||
|
||||
static inline char GetHex_Lower(unsigned v)
|
||||
{
|
||||
return (char)((v < 10) ? ('0' + v) : ('a' + (v - 10)));
|
||||
}
|
||||
|
||||
HRESULT CPlugin::ShowAttributesWindow()
|
||||
@@ -810,11 +815,21 @@ HRESULT CPlugin::ShowAttributesWindow()
|
||||
}
|
||||
else
|
||||
{
|
||||
const bool needUpper = (dataSize <= 8)
|
||||
&& (property.ID == kpidCRC || property.ID == kpidChecksum);
|
||||
for (UInt32 k = 0; k < dataSize; k++)
|
||||
{
|
||||
Byte b = ((const Byte *)data)[k];
|
||||
s += GetHex((Byte)((b >> 4) & 0xF));
|
||||
s += GetHex((Byte)(b & 0xF));
|
||||
unsigned b = ((const Byte *)data)[k];
|
||||
if (needUpper)
|
||||
{
|
||||
s += GetHex_Upper((b >> 4) & 0xF);
|
||||
s += GetHex_Upper(b & 0xF);
|
||||
}
|
||||
else
|
||||
{
|
||||
s += GetHex_Lower((b >> 4) & 0xF);
|
||||
s += GetHex_Lower(b & 0xF);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -17,7 +17,7 @@ int CPlugin::DeleteFiles(PluginPanelItem *panelItems, int numItems, int opMode)
|
||||
{
|
||||
if (numItems == 0)
|
||||
return FALSE;
|
||||
if (_agent->IsThereReadOnlyArc())
|
||||
if (_agent->IsThere_ReadOnlyArc())
|
||||
{
|
||||
g_StartupInfo.ShowMessage(NMessageID::kUpdateNotSupportedForThisArchive);
|
||||
return FALSE;
|
||||
|
||||
@@ -37,6 +37,12 @@ HRESULT CPlugin::ExtractFiles(
|
||||
const UString &destPath,
|
||||
bool passwordIsDefined, const UString &password)
|
||||
{
|
||||
if (_agent->_isHashHandler)
|
||||
{
|
||||
g_StartupInfo.ShowMessage(NMessageID::kMoveIsNotSupported);
|
||||
return NFileOperationReturnCode::kError;
|
||||
}
|
||||
|
||||
CScreenRestorer screenRestorer;
|
||||
CProgressBox progressBox;
|
||||
CProgressBox *progressBoxPointer = NULL;
|
||||
|
||||
@@ -81,18 +81,17 @@ NFileOperationReturnCode::EEnum CPlugin::PutFiles(
|
||||
struct PluginPanelItem *panelItems, int numItems,
|
||||
int moveMode, int opMode)
|
||||
{
|
||||
/*
|
||||
if (moveMode != 0)
|
||||
if (moveMode != 0
|
||||
&& _agent->_isHashHandler)
|
||||
{
|
||||
g_StartupInfo.ShowMessage(NMessageID::kMoveIsNotSupported);
|
||||
return NFileOperationReturnCode::kError;
|
||||
}
|
||||
*/
|
||||
|
||||
if (numItems <= 0)
|
||||
return NFileOperationReturnCode::kError;
|
||||
|
||||
if (_agent->IsThereReadOnlyArc())
|
||||
if (_agent->IsThere_ReadOnlyArc())
|
||||
{
|
||||
g_StartupInfo.ShowMessage(NMessageID::kUpdateNotSupportedForThisArchive);
|
||||
return NFileOperationReturnCode::kError;
|
||||
@@ -231,8 +230,11 @@ NFileOperationReturnCode::EEnum CPlugin::PutFiles(
|
||||
updateCallbackSpec->PasswordIsDefined = PasswordIsDefined;
|
||||
updateCallbackSpec->Password = Password;
|
||||
|
||||
if (SetOutProperties(outArchive, compressionInfo.Level) != S_OK)
|
||||
return NFileOperationReturnCode::kError;
|
||||
if (!_agent->_isHashHandler)
|
||||
{
|
||||
if (SetOutProperties(outArchive, compressionInfo.Level) != S_OK)
|
||||
return NFileOperationReturnCode::kError;
|
||||
}
|
||||
|
||||
/*
|
||||
outArchive->SetFolder(_folder);
|
||||
@@ -726,7 +728,7 @@ static const char * const k_CreateFolder_History = "NewFolder"; // we use defaul
|
||||
|
||||
HRESULT CPlugin::CreateFolder()
|
||||
{
|
||||
if (_agent->IsThereReadOnlyArc())
|
||||
if (_agent->IsThere_ReadOnlyArc())
|
||||
{
|
||||
g_StartupInfo.ShowMessage(NMessageID::kUpdateNotSupportedForThisArchive);
|
||||
return TRUE;
|
||||
|
||||
@@ -22,6 +22,7 @@ CURRENT_OBJS = \
|
||||
$O\UpdateCallbackFar.obj \
|
||||
|
||||
COMMON_OBJS = \
|
||||
$O\DynLimBuf.obj \
|
||||
$O\IntToString.obj \
|
||||
$O\NewHandler.obj \
|
||||
$O\MyString.obj \
|
||||
@@ -52,6 +53,7 @@ WIN_OBJS = \
|
||||
$O\FileStreams.obj \
|
||||
$O\FilterCoder.obj \
|
||||
$O\LimitedStreams.obj \
|
||||
$O\MethodProps.obj \
|
||||
$O\ProgressUtils.obj \
|
||||
$O\PropId.obj \
|
||||
$O\StreamObjects.obj \
|
||||
@@ -64,6 +66,7 @@ UI_COMMON_OBJS = \
|
||||
$O\DefaultName.obj \
|
||||
$O\EnumDirItems.obj \
|
||||
$O\ExtractingFilePath.obj \
|
||||
$O\HashCalc.obj \
|
||||
$O\LoadCodecs.obj \
|
||||
$O\OpenArchive.obj \
|
||||
$O\PropIDUtils.obj \
|
||||
@@ -77,6 +80,7 @@ UI_COMMON_OBJS = \
|
||||
$O\ZipRegistry.obj \
|
||||
|
||||
AR_COMMON_OBJS = \
|
||||
$O\ItemNameUtils.obj \
|
||||
$O\OutStreamWithCRC.obj \
|
||||
|
||||
AGENT_OBJS = \
|
||||
|
||||
Reference in New Issue
Block a user