From: didg Date: Fri, 29 Sep 2006 09:27:54 +0000 (+0000) Subject: for .xx files don't set invisible bit if create by netatalk X-Git-Tag: netatalk-2-0-4-beta1~41 X-Git-Url: https://arthur.barton.de/gitweb/?p=netatalk.git;a=commitdiff_plain;h=aab393be3aeb37da3430fd3a7ecb528cfcfbe7ce for .xx files don't set invisible bit if create by netatalk --- diff --git a/config/AppleVolumes.default.tmpl b/config/AppleVolumes.default.tmpl index 0980ef08..823a1a44 100644 --- a/config/AppleVolumes.default.tmpl +++ b/config/AppleVolumes.default.tmpl @@ -83,8 +83,7 @@ # this option gets set, certain file names # become illegal. these are .Parent and # anything that starts with .Apple. also, dot -# files created on the unix side are marked -# invisible. +# files created on the unix side are marked invisible. # limitsize -> limit disk size reporting to 2GB. this is # here for older macintoshes using newer # appleshare clients. yucko. diff --git a/etc/afpd/file.c b/etc/afpd/file.c index c7130b8d..b1072f19 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.18 2006-09-19 02:24:04 didg Exp $ + * $Id: file.c,v 1.92.2.2.2.31.2.19 2006-09-29 09:27:54 didg Exp $ * * Copyright (c) 1990,1993 Regents of The University of Michigan. * All Rights Reserved. See COPYRIGHT. @@ -657,7 +657,7 @@ int ibuflen _U_, *rbuflen; openf = O_RDWR|O_CREAT|O_EXCL; } - if ( ad_open( upath, vol_noadouble(vol)|ADFLAGS_DF|ADFLAGS_HF|ADFLAGS_NOHF, + if ( ad_open( upath, vol_noadouble(vol)|ADFLAGS_DF|ADFLAGS_HF|ADFLAGS_NOHF|ADFLAGS_CREATE, openf, 0666, adp) < 0 ) { switch ( errno ) { case EROFS: diff --git a/include/atalk/adouble.h b/include/atalk/adouble.h index b4a3ec0c..cafe27a4 100644 --- a/include/atalk/adouble.h +++ b/include/atalk/adouble.h @@ -1,5 +1,5 @@ /* - * $Id: adouble.h,v 1.21.6.20.2.6 2006-09-19 02:24:06 didg Exp $ + * $Id: adouble.h,v 1.21.6.20.2.7 2006-09-29 09:27:54 didg Exp $ * Copyright (c) 1990,1991 Regents of The University of Michigan. * All Rights Reserved. * @@ -271,6 +271,7 @@ struct adouble { #define ADFLAGS_V1COMPAT (1<<4) #define ADFLAGS_NOHF (1<<5) /* not an error if no ressource fork */ #define ADFLAGS_RDONLY (1<<6) /* don't try readwrite */ +#define ADFLAGS_CREATE (1<<7) /* adouble v2 cnid cache */ #define ADVOL_NODEV (1 << 0) diff --git a/libatalk/adouble/ad_open.c b/libatalk/adouble/ad_open.c index 20cfcbb3..724aee94 100644 --- a/libatalk/adouble/ad_open.c +++ b/libatalk/adouble/ad_open.c @@ -1,5 +1,5 @@ /* - * $Id: ad_open.c,v 1.30.6.18.2.6 2006-09-19 02:24:06 didg Exp $ + * $Id: ad_open.c,v 1.30.6.18.2.7 2006-09-29 09:27:54 didg Exp $ * * Copyright (c) 1999 Adrian Sun (asun@u.washington.edu) * Copyright (c) 1990,1991 Regents of The University of Michigan. @@ -1194,7 +1194,9 @@ static int new_rfork(const char *path, struct adouble *ad, int adflags) } /* make things invisible */ - if ((ad->ad_options & ADVOL_INVDOTS) && (*path == '.') && strcmp(path, ".") && strcmp(path, "..")) { + if ((ad->ad_options & ADVOL_INVDOTS) && !(adflags & ADFLAGS_CREATE) && + (*path == '.') && strcmp(path, ".") && strcmp(path, "..")) + { ashort = htons(ATTRBIT_INVISIBLE); ad_setattr(ad, ashort); ashort = htons(FINDERINFO_INVISIBLE);