This commit is contained in:
Igor Pavlov
2016-01-01 00:00:00 +00:00
committed by Kornel Lesiński
parent 9608215ad8
commit c20d013055
6 changed files with 13 additions and 14 deletions

View File

@@ -1,8 +1,8 @@
#define MY_VER_MAJOR 15 #define MY_VER_MAJOR 15
#define MY_VER_MINOR 13 #define MY_VER_MINOR 14
#define MY_VER_BUILD 0 #define MY_VER_BUILD 0
#define MY_VERSION_NUMBERS "15.13" #define MY_VERSION_NUMBERS "15.14"
#define MY_VERSION "15.13" #define MY_VERSION "15.14"
#define MY_DATE "2015-12-31" #define MY_DATE "2015-12-31"
#undef MY_COPYRIGHT #undef MY_COPYRIGHT
#undef MY_VERSION_COPYRIGHT_DATE #undef MY_VERSION_COPYRIGHT_DATE

View File

@@ -572,6 +572,7 @@ public:
HRESULT FlushCorrupted(unsigned folderIndex); HRESULT FlushCorrupted(unsigned folderIndex);
HRESULT Unsupported(); HRESULT Unsupported();
bool NeedMoreWrite() const { return (m_FolderSize > m_PosInFolder); }
UInt64 GetRemain() const { return m_FolderSize - m_PosInFolder; } UInt64 GetRemain() const { return m_FolderSize - m_PosInFolder; }
UInt64 GetPosInFolder() const { return m_PosInFolder; } UInt64 GetPosInFolder() const { return m_PosInFolder; }
}; };
@@ -831,9 +832,7 @@ STDMETHODIMP CFolderOutStream::Write(const void *data, UInt32 size, UInt32 *proc
HRESULT CFolderOutStream::FlushCorrupted(unsigned folderIndex) HRESULT CFolderOutStream::FlushCorrupted(unsigned folderIndex)
{ {
UInt64 remain = GetRemain(); if (!NeedMoreWrite())
if (remain == 0)
{ {
CMyComPtr<IArchiveExtractCallbackMessage> callbackMessage; CMyComPtr<IArchiveExtractCallbackMessage> callbackMessage;
m_ExtractCallback.QueryInterface(IID_IArchiveExtractCallbackMessage, &callbackMessage); m_ExtractCallback.QueryInterface(IID_IArchiveExtractCallbackMessage, &callbackMessage);
@@ -851,9 +850,9 @@ HRESULT CFolderOutStream::FlushCorrupted(unsigned folderIndex)
for (;;) for (;;)
{ {
UInt64 remain = GetRemain(); if (!NeedMoreWrite())
if (remain == 0)
return S_OK; return S_OK;
UInt64 remain = GetRemain();
UInt32 size = (remain < kBufSize ? (UInt32)remain : (UInt32)kBufSize); UInt32 size = (remain < kBufSize ? (UInt32)remain : (UInt32)kBufSize);
UInt32 processedSizeLocal = 0; UInt32 processedSizeLocal = 0;
RINOK(Write2(buf, size, &processedSizeLocal, false)); RINOK(Write2(buf, size, &processedSizeLocal, false));
@@ -1075,7 +1074,7 @@ STDMETHODIMP CHandler::Extract(const UInt32 *indices, UInt32 numItems,
bool keepInputBuffer = false; bool keepInputBuffer = false;
bool thereWasNotAlignedChunk = false; bool thereWasNotAlignedChunk = false;
for (UInt32 bl = 0; cabFolderOutStream->GetRemain() != 0;) for (UInt32 bl = 0; cabFolderOutStream->NeedMoreWrite();)
{ {
if (volIndex >= m_Database.Volumes.Size()) if (volIndex >= m_Database.Volumes.Size())
{ {
@@ -1217,7 +1216,7 @@ STDMETHODIMP CHandler::Extract(const UInt32 *indices, UInt32 numItems,
} }
} }
if (res != S_OK || cabFolderOutStream->GetRemain() != 0) if (res != S_OK || cabFolderOutStream->NeedMoreWrite())
{ {
RINOK(cabFolderOutStream->FlushCorrupted(folderIndex2)); RINOK(cabFolderOutStream->FlushCorrupted(folderIndex2));
} }

View File

@@ -10,7 +10,7 @@ AppName = "7-Zip"
InstallDir = %CE1%\%AppName% InstallDir = %CE1%\%AppName%
[Strings] [Strings]
AppVer = "15.13" AppVer = "15.14"
AppDate = "2015-12-31" AppDate = "2015-12-31"
[CEDevice] [CEDevice]

View File

@@ -2,7 +2,7 @@
;Defines ;Defines
!define VERSION_MAJOR 15 !define VERSION_MAJOR 15
!define VERSION_MINOR 13 !define VERSION_MINOR 14
!define VERSION_POSTFIX_FULL "" !define VERSION_POSTFIX_FULL ""
!ifdef WIN64 !ifdef WIN64
!ifdef IA64 !ifdef IA64

View File

@@ -1,7 +1,7 @@
<?xml version="1.0"?> <?xml version="1.0"?>
<?define VerMajor = "15" ?> <?define VerMajor = "15" ?>
<?define VerMinor = "13" ?> <?define VerMinor = "14" ?>
<?define VerBuild = "00" ?> <?define VerBuild = "00" ?>
<?define MmVer = "$(var.VerMajor).$(var.VerMinor)" ?> <?define MmVer = "$(var.VerMajor).$(var.VerMinor)" ?>
<?define MmHex = "$(var.VerMajor)$(var.VerMinor)" ?> <?define MmHex = "$(var.VerMajor)$(var.VerMinor)" ?>

View File

@@ -1,4 +1,4 @@
7-Zip 15.13 Sources 7-Zip 15.14 Sources
------------------- -------------------
7-Zip is a file archiver for Windows. 7-Zip is a file archiver for Windows.