+ Files with zero size are now processed properly during archive compacting

+ Fixed few memory leaks
This commit is contained in:
Ladislav Zezula
2014-12-02 09:38:34 +01:00
parent 495b2ab3d4
commit 3e594190e4
5 changed files with 208 additions and 167 deletions

View File

@@ -479,11 +479,14 @@ int SFileAddFile_Init(
// Call the callback, if needed
if(ha->pfnAddFileCB != NULL)
ha->pfnAddFileCB(ha->pvAddFileUserData, 0, hf->dwDataSize, false);
hf->nAddFileError = ERROR_SUCCESS;
}
// Store the error code from Add File operation
if(hf != NULL)
hf->nAddFileError = nError;
// Fre the file handle if failed
if(nError != ERROR_SUCCESS && hf != NULL)
FreeFileHandle(hf);
// Give the handle to the caller
*phf = hf;
return nError;
}