--- BasiliskII/src/extfs.cpp 2001/02/02 20:52:57 1.24 +++ BasiliskII/src/extfs.cpp 2001/07/06 17:36:06 1.26 @@ -976,11 +976,11 @@ static int16 fs_volume_mount(uint32 pb) // Init VCB WriteMacInt16(vcb + vcbSigWord, 0x4244); #if defined(__BEOS__) || defined(WIN32) - WriteMacInt32(vcb + vcbCrDate, root_stat.st_crtime + TIME_OFFSET); + WriteMacInt32(vcb + vcbCrDate, TimeToMacTime(root_stat.st_crtime)); #else WriteMacInt32(vcb + vcbCrDate, 0); #endif - WriteMacInt32(vcb + vcbLsMod, root_stat.st_mtime + TIME_OFFSET); + WriteMacInt32(vcb + vcbLsMod, TimeToMacTime(root_stat.st_mtime)); WriteMacInt32(vcb + vcbVolBkUp, 0); WriteMacInt16(vcb + vcbNmFls, 1); //!! WriteMacInt16(vcb + vcbNmRtDirs, 1); //!! @@ -1039,11 +1039,11 @@ static int16 fs_get_vol_info(uint32 pb, if (ReadMacInt32(pb + ioNamePtr)) pstrcpy((char *)Mac2HostAddr(ReadMacInt32(pb + ioNamePtr)), VOLUME_NAME); #if defined(__BEOS__) || defined(WIN32) - WriteMacInt32(pb + ioVCrDate, root_stat.st_crtime + TIME_OFFSET); + WriteMacInt32(pb + ioVCrDate, TimeToMacTime(root_stat.st_crtime)); #else WriteMacInt32(pb + ioVCrDate, 0); #endif - WriteMacInt32(pb + ioVLsMod, root_stat.st_mtime + TIME_OFFSET); + WriteMacInt32(pb + ioVLsMod, TimeToMacTime(root_stat.st_mtime)); WriteMacInt16(pb + ioVAtrb, 0); WriteMacInt16(pb + ioVNmFls, 1); //!! WriteMacInt16(pb + ioVBitMap, 0); @@ -1231,13 +1231,13 @@ read_next_de: WriteMacInt32(pb + ioDirID, fs_item->id); #if defined(__BEOS__) || defined(WIN32) - WriteMacInt32(pb + ioFlCrDat, st.st_crtime + TIME_OFFSET); + WriteMacInt32(pb + ioFlCrDat, TimeToMacTime(st.st_crtime)); #else WriteMacInt32(pb + ioFlCrDat, 0); #endif - WriteMacInt32(pb + ioFlMdDat, st.st_mtime + TIME_OFFSET); + WriteMacInt32(pb + ioFlMdDat, TimeToMacTime(st.st_mtime)); - get_finfo(full_path, pb + ioFlFndrInfo, hfs ? pb + ioFlXFndrInfo : 0); + get_finfo(full_path, pb + ioFlFndrInfo, hfs ? pb + ioFlXFndrInfo : 0, false); WriteMacInt16(pb + ioFlStBlk, 0); WriteMacInt32(pb + ioFlLgLen, st.st_size); @@ -1274,7 +1274,7 @@ static int16 fs_set_file_info(uint32 pb, return fnfErr; // Set Finder info - set_finfo(full_path, pb + ioFlFndrInfo, hfs ? pb + ioFlXFndrInfo : 0); + set_finfo(full_path, pb + ioFlFndrInfo, hfs ? pb + ioFlXFndrInfo : 0, false); //!! times return noErr; @@ -1353,7 +1353,7 @@ read_next_de: WriteMacInt32(pb + ioDirID, fs_item->id); WriteMacInt32(pb + ioFlParID, fs_item->parent_id); #if defined(__BEOS__) || defined(WIN32) - WriteMacInt32(pb + ioFlCrDat, st.st_crtime + TIME_OFFSET); + WriteMacInt32(pb + ioFlCrDat, TimeToMacTime(st.st_crtime)); #else WriteMacInt32(pb + ioFlCrDat, 0); #endif @@ -1363,10 +1363,10 @@ read_next_de: fs_item->mtime = mtime; cached = false; } - WriteMacInt32(pb + ioFlMdDat, mtime + TIME_OFFSET); + WriteMacInt32(pb + ioFlMdDat, TimeToMacTime(mtime)); WriteMacInt32(pb + ioFlBkDat, 0); - get_finfo(full_path, pb + ioFlFndrInfo, pb + ioFlXFndrInfo); + get_finfo(full_path, pb + ioFlFndrInfo, pb + ioFlXFndrInfo, S_ISDIR(st.st_mode)); if (S_ISDIR(st.st_mode)) { @@ -1422,7 +1422,7 @@ static int16 fs_set_cat_info(uint32 pb) return errno2oserr(); // Set Finder info - set_finfo(full_path, pb + ioFlFndrInfo, pb + ioFlXFndrInfo); + set_finfo(full_path, pb + ioFlFndrInfo, pb + ioFlXFndrInfo, S_ISDIR(st.st_mode)); //!! times return noErr; @@ -1510,7 +1510,7 @@ static int16 fs_open(uint32 pb, uint32 d WriteMacInt32(fcb + fcbVPtr, vcb); WriteMacInt32(fcb + fcbClmpSize, CLUMP_SIZE); - get_finfo(full_path, fs_data + fsPB, 0); + get_finfo(full_path, fs_data + fsPB, 0, false); WriteMacInt32(fcb + fcbFType, ReadMacInt32(fs_data + fsPB + fdType)); WriteMacInt32(fcb + fcbCatPos, fd);