]> 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:44:58 +0000 (09:44 +0000)
committerdidg <didg>
Fri, 29 Sep 2006 09:44:58 +0000 (09:44 +0000)
config/AppleVolumes.default.tmpl
etc/afpd/file.c
include/atalk/adouble.h
libatalk/adouble/ad_open.c

index ded1f6fa961b47b55b9832315c093d486e29738e..c855ffd068a61cb338ba8557b25828d857deed69 100644 (file)
@@ -81,8 +81,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 e091ba0fdadd258a5a0d08a2c698184b354ccc73..6adafe1798d23f29c8d31da16a5a163bc0dac4d5 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: file.c,v 1.103 2006-09-29 09:39:16 didg Exp $
+ * $Id: file.c,v 1.104 2006-09-29 09:44:58 didg Exp $
  *
  * Copyright (c) 1990,1993 Regents of The University of Michigan.
  * All Rights Reserved.  See COPYRIGHT.
@@ -638,7 +638,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 17f02c53554308b3faf877d24951c22dc4e6a6e1..3bc262190570e2ca2e582fb1aebacb4356d03ae4 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: adouble.h,v 1.31 2006-09-29 09:39:16 didg Exp $
+ * $Id: adouble.h,v 1.32 2006-09-29 09:44:59 didg Exp $
  * Copyright (c) 1990,1991 Regents of The University of Michigan.
  * All Rights Reserved.
  *
@@ -308,6 +308,7 @@ struct adouble_fops {
 #define ADFLAGS_OPENFORKS (1<<7)  /* check for open fork in ad_metadata function */
 #define ADFLAGS_RF       (1<<8) 
 #define ADFLAGS_MD       ADFLAGS_HF /* (1<<9) */
+#define ADFLAGS_CREATE    (1<<9)
 
 /* adouble v2 cnid cache */
 #define ADVOL_NODEV      (1 << 0)   
index 09f2ed3dff1331da03a8878aa64a1f054deba2bb..c0a2f10411d7ea94441b23336769d97d2c891d4a 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: ad_open.c,v 1.37 2006-09-29 09:39:16 didg Exp $
+ * $Id: ad_open.c,v 1.38 2006-09-29 09:44:59 didg Exp $
  *
  * Copyright (c) 1999 Adrian Sun (asun@u.washington.edu)
  * Copyright (c) 1990,1991 Regents of The University of Michigan.
@@ -1631,7 +1631,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);