--- xmil/statsave.c 2004/08/12 20:09:42 1.2 +++ xmil/statsave.c 2004/08/15 12:32:11 1.5 @@ -146,7 +146,7 @@ sfo_err1: static int statflag_closesection(SFFILEH sffh) { UINT leng; - BYTE zero[16]; + UINT8 zero[16]; if (sffh == NULL) { goto sfcs_err1; @@ -467,8 +467,9 @@ static int flagload_evt(STFLAGH sfh, con // ---- disk typedef struct { - OEMCHAR path[MAX_PATH]; - int readonly; + OEMCHAR fname[MAX_PATH]; + UINT32 ftype; + UINT readonly; DOSDATE date; DOSTIME time; } STATDISK; @@ -477,16 +478,17 @@ static const OEMCHAR str_fddx[] = OEMTEX static const OEMCHAR str_updated[] = OEMTEXT("%s: updated"); static const OEMCHAR str_notfound[] = OEMTEXT("%s: not found"); -static int disksave(STFLAGH sfh, const OEMCHAR *path, int readonly) { +static int disksave(STFLAGH sfh, const _FDDFILE *fdd) { STATDISK st; FILEH fh; ZeroMemory(&st, sizeof(st)); - if ((path) && (path[0])) { - file_cpyname(st.path, path, sizeof(st.path)); - st.readonly = readonly; - fh = file_open_rb(path); + if (fdd->type != DISKTYPE_NOTREADY) { + file_cpyname(st.fname, fdd->fname, NELEMENTS(st.fname)); + st.ftype = fdd->ftype; + st.readonly = fdd->protect; + fh = file_open_rb(st.fname); if (fh != FILEH_INVALID) { file_getdatetime(fh, &st.date, &st.time); file_close(fh); @@ -501,8 +503,8 @@ static int flagsave_disk(STFLAGH sfh, co REG8 i; ret = STATFLAG_SUCCESS; - for (i=0; i<4; i++) { - ret |= disksave(sfh, fddfile_diskname(i), fddfile_diskprotect(i)); + for (i=0; i