]> arthur.barton.de Git - netatalk.git/commitdiff
Fix problem with "corrupt resource fork" error on littleendian machines.
authorjmarcus <jmarcus>
Fri, 19 Oct 2001 02:39:07 +0000 (02:39 +0000)
committerjmarcus <jmarcus>
Fri, 19 Oct 2001 02:39:07 +0000 (02:39 +0000)
Thanks to Brandon Warren <bwarren@u.washington.edu>.

bin/afile/achfile.c

index e5c1ee2db0e8ff817fb560d04bd75f844b04eb36..31fc3be85735ac9d3a62f3398a6ba99a3ae52346 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: achfile.c,v 1.4 2001-09-05 18:38:23 srittau Exp $
+ * $Id: achfile.c,v 1.5 2001-10-19 02:39:07 jmarcus Exp $
  *
     afile - determine the MacOS creator/type of files
 
@@ -214,7 +214,7 @@ int handle_file(const char *filename)
     close(fd);
     return -1;
   }
-  if (ad->ad_magic != AD_MAGIC) {
+  if ( ntohl(ad->ad_magic) != AD_MAGIC) {
     fprintf(stderr, "achfile:%s: corrupt resource fork\n", filename);
     free(adname);
     close(fd);