ksherlock / mpw

Macintosh Programmer's Workshop (mpw) compatibility layer
239 stars 21 forks source link

Return error from FSMakeFSSpec if file not found #58

Closed ryandesign closed 1 year ago

ryandesign commented 1 year ago

This works for me to fix the problems with MWC68K/MWCPPC I reported in #56, and SC and MrC still work too. Does this fix look correct to you? I have not yet tested it extensively.

ryandesign commented 1 year ago

I wasn't sure if it was ok to use sname (which is not necessarily absolute) here or if I should extract the absolute path from path.

ryandesign commented 1 year ago

Er, what I meant was, path starts off as the absolute path to the item:

path = realpath(sname);

but is then changed into just the path to the directory:

path = path.substr(0, pos + 1); // include the /

I wasn't sure if I should save the original absolute path and use that.

ksherlock commented 1 year ago

I was wondering that myself but it's 6 of 1, half a dozen of the other. Thanks for tracking it down.