AmendHub

Download:

jcs

/

amend

/

amendments

/

60

bile: Store full bile file pathname in filename


jcs made amendment 60 over 2 years ago
--- bile.c Sat Jan 29 14:33:45 2022 +++ bile.c Thu Feb 3 17:19:20 2022 @@ -139,7 +139,9 @@ bile_open(const Str255 filename, short vrefnum) bile = xmalloczero(sizeof(struct bile)); bile->vrefnum = vrefnum; bile->frefnum = fh; - memcpy(bile->filename, filename, sizeof(bile->filename)); + + if (getpath(vrefnum, filename, &bile->filename, true) != 0) + memcpy(bile->filename, filename, sizeof(bile->filename)); bile->file_size = file_size; /* verify magic */