]> arthur.barton.de Git - netatalk.git/commitdiff
fix a bug in default CREATOR/TYPE handling.
authordidg <didg>
Wed, 20 Oct 2004 20:05:27 +0000 (20:05 +0000)
committerdidg <didg>
Wed, 20 Oct 2004 20:05:27 +0000 (20:05 +0000)
etc/afpd/file.c
etc/afpd/volume.c

index 673ebbb655f274089596587dc621992b5f0e8f43..6a543dc6607b0c3ae3ee3ed02fef766c16e1019b 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: file.c,v 1.92.2.2.2.31.2.1 2004-10-20 19:48:38 didg Exp $
+ * $Id: file.c,v 1.92.2.2.2.31.2.2 2004-10-20 20:05:27 didg Exp $
  *
  * Copyright (c) 1990,1993 Regents of The University of Michigan.
  * All Rights Reserved.  See COPYRIGHT.
@@ -85,8 +85,11 @@ void *get_finderinfo(const char *mpath, struct adouble *adp, void *data)
     if (adp)
         ad_finder = ad_entry(adp, ADEID_FINDERI);
 
-    if ((adp != NULL) && (ad_finder != NULL)) {
+    if ((ad_finder != NULL)) {
         memcpy(data, ad_finder, 32);
+        /* default type ? */
+        if (!memcmp(ad_finder, ufinderi, 8))
+            chk_ext = 1;
     }
     else {
         memcpy(data, ufinderi, 32);
@@ -957,7 +960,6 @@ int setfilparams(struct vol *vol,
             )) {
                 memcpy(finder_buf, ufinderi, 8 );
             }
-
             memcpy(ad_entry( adp, ADEID_FINDERI ), finder_buf, 32 );
             break;
         case FILPBIT_UNIXPR :
index cedb90fe00e4efecce7d07e7e3eb072fd22b0ffe..068142359c3aa6834d812b0ee7dc2a13db7062f4 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: volume.c,v 1.51.2.7.2.33 2004-08-11 20:15:35 bfernhomberg Exp $
+ * $Id: volume.c,v 1.51.2.7.2.33.2.1 2004-10-20 20:05:27 didg Exp $
  *
  * Copyright (c) 1990,1993 Regents of The University of Michigan.
  * All Rights Reserved.  See COPYRIGHT.
@@ -838,7 +838,12 @@ static void sortextmap( void)
     }
     if (Extmap_cnt) {
         qsort(Extmap, Extmap_cnt, sizeof(struct extmap), extmap_cmp);
-        Defextmap = Extmap;
+        if (*Extmap->em_ext == 0) {
+            /* the first line is really "." the default entry, 
+             * we remove the leading '.' in setextmap
+            */
+            Defextmap = Extmap;
+        }
     }
 }