cabinet: Treat only -1 as an error from the FDICopy callback.

Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Alexandre Julliard 2017-12-15 18:47:14 +01:00
parent c2f34d1b24
commit 5cb30bbf6e
2 changed files with 3 additions and 3 deletions

View File

@ -2496,7 +2496,7 @@ BOOL __cdecl FDICopy(
fdin.psz2 = (CAB(mii).nextinfo) ? CAB(mii).nextinfo : &emptystring;
fdin.psz3 = pszCabPath;
if (((*pfnfdin)(fdintCABINET_INFO, &fdin))) {
if (pfnfdin(fdintCABINET_INFO, &fdin) == -1) {
set_error( fdi, FDIERROR_USER_ABORT, 0 );
goto bail_and_fail;
}
@ -2623,7 +2623,7 @@ BOOL __cdecl FDICopy(
fdin.psz2 = (CAB(mii).prevname) ? CAB(mii).prevname : &emptystring;
fdin.psz3 = (CAB(mii).previnfo) ? CAB(mii).previnfo : &emptystring;
if (((*pfnfdin)(fdintPARTIAL_FILE, &fdin))) {
if (pfnfdin(fdintPARTIAL_FILE, &fdin) == -1) {
set_error( fdi, FDIERROR_USER_ABORT, 0 );
goto bail_and_fail;
}

View File

@ -744,7 +744,7 @@ static void test_FDIIsCabinet(void)
static INT_PTR __cdecl CopyProgress(FDINOTIFICATIONTYPE fdint, PFDINOTIFICATION pfdin)
{
return 0;
return 37; /* doc says 0, but anything != -1 apparently means success as well */
}
static INT_PTR CDECL fdi_mem_open(char *name, int oflag, int pmode)