diff --git a/dlls/cabinet/fci.c b/dlls/cabinet/fci.c index b5e6c9c23f6..34ab2307209 100644 --- a/dlls/cabinet/fci.c +++ b/dlls/cabinet/fci.c @@ -2416,6 +2416,10 @@ BOOL __cdecl FCIAddFile( } /* get information about the file */ + /* set defaults in case callback doesn't set one or more fields */ + cffile.attribs=0; + cffile.date=0; + cffile.time=0; file_handle=(*pfnfcigoi)(pszSourceFile, &(cffile.date), &(cffile.time), &(cffile.attribs), &err, p_fci_internal->pv); /* check file_handle */ diff --git a/dlls/cabinet/tests/fdi.c b/dlls/cabinet/tests/fdi.c index d3b252c6c30..7c10b3d1663 100644 --- a/dlls/cabinet/tests/fdi.c +++ b/dlls/cabinet/tests/fdi.c @@ -436,6 +436,9 @@ static INT_PTR get_open_info(char *pszName, USHORT *pdate, USHORT *ptime, attrs = GetFileAttributes(pszName); ok(attrs != INVALID_FILE_ATTRIBUTES, "Failed to GetFileAttributes\n"); + /* fixme: should convert attrs to *pattribs, make sure + * have a test that catches the fact that we don't? + */ return (INT_PTR)handle; }