]> arthur.barton.de Git - netatalk.git/commitdiff
for .xx files don't set invisible bit if create by netatalk
authordidg <didg>
Fri, 29 Sep 2006 09:27:54 +0000 (09:27 +0000)
committerdidg <didg>
Fri, 29 Sep 2006 09:27:54 +0000 (09:27 +0000)
config/AppleVolumes.default.tmpl
etc/afpd/file.c
include/atalk/adouble.h
libatalk/adouble/ad_open.c

index 0980ef08c9ee4b3fc80eddc0f3599aa7333a14cc..823a1a44fc07d8ab3ee2c246cc103e135ebca3cb 100644 (file)
@@ -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.
index c7130b8df9bff656a64d1fe0bfe68f98cda17d84..b1072f198a8019ff0711a03dc0ec7c74f9b287a3 100644 (file)
@@ -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:
index b4a3ec0c94f09960b7445a02e50b30de86b0ec47..cafe27a4e5d74926d4b41171bc430e1cd933105e 100644 (file)
@@ -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)   
index 20cfcbb31ab81a4d506965449be3a7610739a7be..724aee94c68de04ad057bb80bf307ccfea9e4859 100644 (file)
@@ -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);