summaryrefslogtreecommitdiff
path: root/tomacbinary.c
diff options
context:
space:
mode:
authorMats Behre <mb.maillists@gmail.com>2017-06-28 22:48:09 -0400
committerAlexei Podtelezhnikov <apodtele@gmail.com>2017-06-28 22:48:09 -0400
commit35a8a43ba66e1e5ffdff0a283e398a6a1fc13a54 (patch)
treee7752d5bc633fd9875952332adbea68139c780b8 /tomacbinary.c
parent399ea0471284c2433999fbcb2a2df6fa037fbaf2 (diff)
POSIX compliant resource fork access.
Diffstat (limited to 'tomacbinary.c')
-rw-r--r--tomacbinary.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/tomacbinary.c b/tomacbinary.c
index 8e7dc5b..5650b11 100644
--- a/tomacbinary.c
+++ b/tomacbinary.c
@@ -50,7 +50,7 @@
/* MacBinary files use the same CRC that binhex does (in the MacBinary header) */
extern unsigned long binhex_crc(unsigned char *buffer,int size);
-/* the resource fork may be opened (on Mac OS/X) by <filename>/rsrc */
+/* the resource fork may be opened (on Mac OS/X) by <filename>/..namedfork/rsrc */
/* tobin [-res rfilename] filename {[-res filename] rfilename} */
@@ -81,11 +81,11 @@ static void Usage(char *prog) {
static FILE *ResForkOfDataFile(char *dataname) {
#ifndef OldMacintosh
/* OS/X and linux with appropriate drivers */
- char *respath = malloc(strlen(dataname)+strlen("/rsrc")+1);
+ char *respath = malloc(strlen(dataname)+strlen("/..namedfork/rsrc")+1);
FILE *temp;
strcpy(respath,dataname);
- strcat(respath,"/rsrc");
+ strcat(respath,"/..namedfork/rsrc");
temp = fopen(respath,"r");
free(respath);
return( temp );