cabinet: FCIAddFile: Set defaults in case callback doesn't set some fields.

oldstable
Dan Kegel 2007-11-03 16:46:46 -07:00 committed by Alexandre Julliard
parent 1c473f3864
commit c2330178eb
2 changed files with 7 additions and 0 deletions

View File

@ -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 */

View File

@ -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;
}