From: didg Date: Wed, 20 Oct 2004 20:05:27 +0000 (+0000) Subject: fix a bug in default CREATOR/TYPE handling. X-Git-Tag: netatalk-2-0-1~13 X-Git-Url: https://arthur.barton.de/cgi-bin/gitweb.cgi?p=netatalk.git;a=commitdiff_plain;h=df94d52917db4e1b5d57be4103e44f40159dc8fc fix a bug in default CREATOR/TYPE handling. --- diff --git a/etc/afpd/file.c b/etc/afpd/file.c index 673ebbb6..6a543dc6 100644 --- a/etc/afpd/file.c +++ b/etc/afpd/file.c @@ -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 : diff --git a/etc/afpd/volume.c b/etc/afpd/volume.c index cedb90fe..06814235 100644 --- a/etc/afpd/volume.c +++ b/etc/afpd/volume.c @@ -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; + } } }