mirror of
https://github.com/Xevion/easy7zip.git
synced 2025-12-10 22:07:08 -06:00
15.07
This commit is contained in:
committed by
Kornel Lesiński
parent
cba375916f
commit
f6444c3256
@@ -10,6 +10,8 @@
|
||||
namespace NArchive {
|
||||
namespace NWim {
|
||||
|
||||
static const Int32 kNumImagesMaxUpdate = (1 << 10);
|
||||
|
||||
class CHandler:
|
||||
public IInArchive,
|
||||
public IArchiveGetRawProps,
|
||||
@@ -34,6 +36,7 @@ class CHandler:
|
||||
|
||||
bool _xmlError;
|
||||
bool _isArc;
|
||||
bool _unsupported;
|
||||
|
||||
bool _set_use_ShowImageNumber;
|
||||
bool _set_showImageNumber;
|
||||
@@ -53,6 +56,26 @@ class CHandler:
|
||||
_defaultImageNumber = -1;
|
||||
}
|
||||
|
||||
bool IsUpdateSupported() const
|
||||
{
|
||||
if (ThereIsError()) return false;
|
||||
if (_db.Images.Size() > kNumImagesMaxUpdate) return false;
|
||||
|
||||
// Solid format is complicated. So we disable updating now.
|
||||
if (!_db.Solids.IsEmpty()) return false;
|
||||
|
||||
if (_volumes.Size() == 0)
|
||||
return true;
|
||||
|
||||
if (_volumes.Size() != 2) return false;
|
||||
if (_volumes[0].Stream) return false;
|
||||
if (_version != k_Version_NonSolid
|
||||
// && _version != k_Version_Solid
|
||||
) return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
bool ThereIsError() const { return _xmlError || _db.ThereIsError(); }
|
||||
HRESULT GetSecurity(UInt32 realIndex, const void **data, UInt32 *dataSize, UInt32 *propType);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user