1187 |
|
return fnfErr; |
1188 |
|
} |
1189 |
|
if (de->d_name[0] == '.') |
1190 |
< |
goto read_next_de; // Suppress name beginning with '.' (MacOS could interpret these as driver names) |
1190 |
> |
goto read_next_de; // Suppress names beginning with '.' (MacOS could interpret these as driver names) |
1191 |
|
//!! suppress directories |
1192 |
|
} |
1193 |
|
add_path_comp(de->d_name); |
1316 |
|
return fnfErr; |
1317 |
|
} |
1318 |
|
if (de->d_name[0] == '.') |
1319 |
< |
goto read_next_de; // Suppress name beginning with '.' (MacOS could interpret these as driver names) |
1319 |
> |
goto read_next_de; // Suppress names beginning with '.' (MacOS could interpret these as driver names) |
1320 |
|
} |
1321 |
|
add_path_comp(de->d_name); |
1322 |
|
|
1352 |
|
fs_item->mtime = mtime; |
1353 |
|
cached = false; |
1354 |
|
} |
1355 |
< |
WriteMacInt32(pb + ioFlMdDat, mtime); |
1355 |
> |
WriteMacInt32(pb + ioFlMdDat, mtime + TIME_OFFSET); |
1356 |
|
WriteMacInt32(pb + ioFlBkDat, 0); |
1357 |
|
if (S_ISDIR(st.st_mode)) { |
1358 |
|
Mac_memset(pb + ioDrUsrWds, 0, SIZEOF_DInfo); |
1374 |
|
de = readdir(d); |
1375 |
|
if (de == NULL) |
1376 |
|
break; |
1377 |
+ |
if (de->d_name[0] == '.') |
1378 |
+ |
continue; // Suppress names beginning with '.' |
1379 |
|
count++; |
1380 |
|
} |
1381 |
|
closedir(d); |
1776 |
|
|
1777 |
|
// Read |
1778 |
|
size_t actual = extfs_read(fd, Mac2HostAddr(ReadMacInt32(pb + ioBuffer)), ReadMacInt32(pb + ioReqCount)); |
1779 |
+ |
int16 read_err = errno2oserr(); |
1780 |
|
D(bug(" actual %d\n", actual)); |
1781 |
|
WriteMacInt32(pb + ioActCount, actual); |
1782 |
|
uint32 pos = lseek(fd, 0, SEEK_CUR); |
1783 |
|
WriteMacInt32(fcb + fcbCrPs, pos); |
1784 |
|
WriteMacInt32(pb + ioPosOffset, pos); |
1785 |
|
if (actual != ReadMacInt32(pb + ioReqCount)) |
1786 |
< |
if (errno) |
1784 |
< |
return errno2oserr(); |
1785 |
< |
else |
1786 |
< |
return eofErr; |
1786 |
> |
return read_err ? read_err : eofErr; |
1787 |
|
else |
1788 |
|
return noErr; |
1789 |
|
} |
1825 |
|
|
1826 |
|
// Write |
1827 |
|
size_t actual = extfs_write(fd, Mac2HostAddr(ReadMacInt32(pb + ioBuffer)), ReadMacInt32(pb + ioReqCount)); |
1828 |
+ |
int16 write_err = errno2oserr(); |
1829 |
|
D(bug(" actual %d\n", actual)); |
1830 |
|
WriteMacInt32(pb + ioActCount, actual); |
1831 |
|
uint32 pos = lseek(fd, 0, SEEK_CUR); |
1832 |
|
WriteMacInt32(fcb + fcbCrPs, pos); |
1833 |
|
WriteMacInt32(pb + ioPosOffset, pos); |
1834 |
|
if (actual != ReadMacInt32(pb + ioReqCount)) |
1835 |
< |
return errno2oserr(); |
1835 |
> |
return write_err; |
1836 |
|
else |
1837 |
|
return noErr; |
1838 |
|
} |
1967 |
|
strcpy(old_path, full_path); |
1968 |
|
|
1969 |
|
// Find path for new directory |
1970 |
< |
Mac2Host_memcpy(fs_data + fsPB, pb, SIZEOF_IOParam); |
1970 |
> |
Mac2Mac_memcpy(fs_data + fsPB, pb, SIZEOF_IOParam); |
1971 |
|
WriteMacInt32(fs_data + fsPB + ioNamePtr, ReadMacInt32(pb + ioNewName)); |
1972 |
|
FSItem *new_dir_item; |
1973 |
|
result = get_item_and_path(fs_data + fsPB, ReadMacInt32(pb + ioNewDirID), new_dir_item); |
2054 |
|
return r.d[0]; |
2055 |
|
|
2056 |
|
// Return information |
2057 |
< |
WriteMacInt16(pb + ioWDProcID, ReadMacInt32(wdcb + wdProcID)); |
2057 |
> |
WriteMacInt32(pb + ioWDProcID, ReadMacInt32(wdcb + wdProcID)); |
2058 |
|
WriteMacInt16(pb + ioWDVRefNum, ReadMacInt16(ReadMacInt32(wdcb + wdVCBPtr) + vcbVRefNum)); |
2059 |
|
if (ReadMacInt32(pb + ioNamePtr)) |
2060 |
|
Mac2Mac_memcpy(ReadMacInt32(pb + ioNamePtr), ReadMacInt32(wdcb + wdVCBPtr) + vcbVN, 28); |