syscalls: Fall back to HOpen if HOpenDF is unavailable - should fix #53

This commit is contained in:
Wolfgang Thaller 2018-03-28 19:17:22 +02:00
parent 1bf9012d5e
commit f1fc4cd228

View File

@ -118,6 +118,8 @@ int _open_r(struct _reent *reent, const char* name, int flags, int mode)
}
OSErr err = HOpenDF(0,0,pname,fsRdWrPerm,&ref);
if(err == paramErr)
err = HOpen(0,0,pname,fsRdWrPerm,&ref);
if(err)
return -1; // TODO: errno