On 2/1/2020 6:10 AM, silverdr_at_wfmh.org.pl wrote: > > >>> Actually it's not simply opening the file. It is when creating new file (with content) by positioning record pointer beyond the end. This causes 50, RECORD NOT PRESENT and expands the file accordingly. > This is when DOS returns 50 on floppy drives and also on IDE64, which supports flattned REL files. I misunderstood your earlier response then. I do handle that, in fatops.c:fat_file_seek: if (buf->pvt.fat.fh.fsize >= pos) { FRESULT res = f_lseek(&buf->pvt.fat.fh, pos); if (res != FR_OK) { parse_error(res,0); f_close(&buf->pvt.fat.fh); free_buffer(buf); return 1; } if (fat_file_read(buf)) return 1; } else { buf->data[2] = (buf->recordlen ? 255:13); buf->lastused = 2; buf->fptr = position; set_error(ERROR_RECORD_MISSING); } Essentially, if the size is smaller that the position being requested, it puts the position there and returns the error. JimReceived on 2020-05-30 00:42:28
Archive generated by hypermail 2.3.0.