Hack to open resource fork on the Mac: open(filename, '*rb').
This commit is contained in:
parent
33f1770ed8
commit
a08095ab02
|
@ -61,9 +61,17 @@ newfileobject(name, mode)
|
||||||
f = (fileobject *) newopenfileobject((FILE *)NULL, name, mode);
|
f = (fileobject *) newopenfileobject((FILE *)NULL, name, mode);
|
||||||
if (f == NULL)
|
if (f == NULL)
|
||||||
return NULL;
|
return NULL;
|
||||||
if ((f->f_fp = fopen(name, mode)) == NULL) {
|
#ifdef THINK_C
|
||||||
|
if (*mode == '*') {
|
||||||
|
FILE *fopenRF();
|
||||||
|
f->f_fp = fopenRF(name, mode+1);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
#endif
|
||||||
|
f->f_fp = fopen(name, mode);
|
||||||
|
if (f->f_fp == NULL) {
|
||||||
|
err_errno(RuntimeError);
|
||||||
DECREF(f);
|
DECREF(f);
|
||||||
err_errno(RuntimeError); /* XXX Should use another error */
|
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
return (object *)f;
|
return (object *)f;
|
||||||
|
|
Loading…
Reference in New Issue