]> arthur.barton.de Git - netatalk.git/blobdiff - etc/afpd/directory.c
Last commit message mentionend the wrong CNID backends!
[netatalk.git] / etc / afpd / directory.c
index 810c1c248e3325ed6476d2f496c55586d2dcef9d..d6845297a855ccfc55c340dcb007c7ace517ff91 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: directory.c,v 1.119 2009-11-19 10:41:23 franklahm Exp $
+ * $Id: directory.c,v 1.121 2009-11-27 12:37:24 didg Exp $
  *
  * Copyright (c) 1990,1993 Regents of The University of Michigan.
  * All Rights Reserved.  See COPYRIGHT.
@@ -1645,7 +1645,7 @@ int getdirparams(const struct vol *vol,
                    (1 << DIRPBIT_FINFO)))) {
 
         ad_init(&ad, vol->v_adouble, vol->v_ad_options);
-        if ( !ad_metadata( upath, ADFLAGS_DIR, &ad) ) {
+        if ( !ad_metadata( upath, vol_noadouble(vol) | ADFLAGS_DIR, &ad) ) {
             isad = 1;
         }
     }
@@ -2576,7 +2576,8 @@ int deletecurdir(struct vol *vol)
     fdir = curdir;
 
     ad_init(&ad, vol->v_adouble, vol->v_ad_options);
-    if ( ad_metadata( ".", ADFLAGS_DIR, &ad) == 0 ) {
+    /* we never want to create a resource fork here, we are going to delete it */
+    if ( ad_metadata( ".", ADFLAGS_NOADOUBLE | ADFLAGS_DIR, &ad) == 0 ) {
 
         ad_getattr(&ad, &ashort);
         ad_close( &ad, ADFLAGS_HF );
@@ -2689,6 +2690,7 @@ int afp_mapid(AFPObj *obj, char *ibuf, size_t ibuflen _U_, char *rbuf, size_t *r
         if ((afp_version < 32) || !(obj->options.flags & OPTION_UUID ))
             return AFPERR_PARAM;
         LOG(log_debug, logtype_afpd, "afp_mapid: valid UUID request");
+        uuidtype_t type;
         len = getnamefromuuid( ibuf, &name, &type);
         if (len != 0)       /* its a error code, not len */
             return AFPERR_NOITEM;