mirror of
https://github.com/Xevion/easy7zip.git
synced 2025-12-08 12:07:03 -06:00
15.10
This commit is contained in:
committed by
Kornel Lesiński
parent
a663a6deb7
commit
7c8a265a15
@@ -1292,6 +1292,18 @@ STDMETHODIMP CHandler::GetArchiveProperty(PROPID propID, PROPVARIANT *value)
|
||||
break;
|
||||
}
|
||||
|
||||
case kpidError:
|
||||
{
|
||||
if (/* &_missingVol || */ !_missingVolName.IsEmpty())
|
||||
{
|
||||
UString s;
|
||||
s.SetFromAscii("Missing volume : ");
|
||||
s += _missingVolName;
|
||||
prop = s;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
case kpidErrorFlags:
|
||||
{
|
||||
UInt32 v = _errorFlags;
|
||||
@@ -1840,13 +1852,18 @@ HRESULT CHandler::Open2(IInStream *stream,
|
||||
break;
|
||||
}
|
||||
|
||||
HRESULT result = openVolumeCallback->GetStream(seqName.GetNextName(), &inStream);
|
||||
if (result == S_FALSE)
|
||||
break;
|
||||
if (result != S_OK)
|
||||
const UString volName = seqName.GetNextName();
|
||||
|
||||
HRESULT result = openVolumeCallback->GetStream(volName, &inStream);
|
||||
|
||||
if (result != S_OK && result != S_FALSE)
|
||||
return result;
|
||||
if (!inStream)
|
||||
|
||||
if (!inStream || result != S_OK)
|
||||
{
|
||||
_missingVolName = volName;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
UInt64 endPos = 0;
|
||||
@@ -2120,6 +2137,7 @@ STDMETHODIMP CHandler::Open(IInStream *stream,
|
||||
STDMETHODIMP CHandler::Close()
|
||||
{
|
||||
COM_TRY_BEGIN
|
||||
_missingVolName.Empty();
|
||||
_errorFlags = 0;
|
||||
// _warningFlags = 0;
|
||||
_isArc = false;
|
||||
|
||||
@@ -381,6 +381,7 @@ private:
|
||||
// UInt32 _warningFlags;
|
||||
bool _isArc;
|
||||
CByteBuffer _comment;
|
||||
UString _missingVolName;
|
||||
|
||||
DECL_EXTERNAL_CODECS_VARS
|
||||
|
||||
|
||||
@@ -855,8 +855,21 @@ STDMETHODIMP CHandler::GetArchiveProperty(PROPID propID, PROPVARIANT *value)
|
||||
break;
|
||||
}
|
||||
|
||||
// case kpidError: if (!_errorMessage.IsEmpty()) prop = _errorMessage; break;
|
||||
|
||||
case kpidError:
|
||||
{
|
||||
// if (!_errorMessage.IsEmpty()) prop = _errorMessage; break;
|
||||
|
||||
if (/* &_missingVol || */ !_missingVolName.IsEmpty())
|
||||
{
|
||||
UString s;
|
||||
s.SetFromAscii("Missing volume : ");
|
||||
s += _missingVolName;
|
||||
prop = s;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
case kpidErrorFlags:
|
||||
{
|
||||
UInt32 v = _errorFlags;
|
||||
@@ -1050,14 +1063,18 @@ HRESULT CHandler::Open2(IInStream *stream,
|
||||
*/
|
||||
}
|
||||
|
||||
UString fullName = seqName.GetNextName();
|
||||
HRESULT result = openVolumeCallback->GetStream(fullName, &inStream);
|
||||
if (result == S_FALSE)
|
||||
break;
|
||||
if (result != S_OK)
|
||||
const UString volName = seqName.GetNextName();
|
||||
|
||||
HRESULT result = openVolumeCallback->GetStream(volName, &inStream);
|
||||
|
||||
if (result != S_OK && result != S_FALSE)
|
||||
return result;
|
||||
if (!inStream)
|
||||
|
||||
if (!inStream || result != S_OK)
|
||||
{
|
||||
_missingVolName = volName;
|
||||
break;
|
||||
}
|
||||
}
|
||||
else
|
||||
inStream = stream;
|
||||
@@ -1216,6 +1233,7 @@ STDMETHODIMP CHandler::Close()
|
||||
{
|
||||
COM_TRY_BEGIN
|
||||
// _errorMessage.Empty();
|
||||
_missingVolName.Empty();
|
||||
_errorFlags = 0;
|
||||
_warningFlags = 0;
|
||||
_isArc = false;
|
||||
|
||||
@@ -79,6 +79,7 @@ class CHandler:
|
||||
UInt32 _errorFlags;
|
||||
UInt32 _warningFlags;
|
||||
bool _isArc;
|
||||
UString _missingVolName;
|
||||
|
||||
DECL_EXTERNAL_CODECS_VARS
|
||||
|
||||
|
||||
Reference in New Issue
Block a user