]> arthur.barton.de Git - netatalk.git/blobdiff - libatalk/adouble/ad_open.c
Make dot files visible by default with usedots, add invisibledots for the old behavio...
[netatalk.git] / libatalk / adouble / ad_open.c
index 9451efff6da80463bba6d89a84476494be6c51a8..4d5a2850b1419ae21ef3e24e43afb53532cd2b42 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: ad_open.c,v 1.35 2005-05-25 18:24:24 didg Exp $
+ * $Id: ad_open.c,v 1.36 2006-09-19 23:00:50 didg Exp $
  *
  * Copyright (c) 1999 Adrian Sun (asun@u.washington.edu)
  * Copyright (c) 1990,1991 Regents of The University of Michigan.
@@ -1296,12 +1296,11 @@ static int new_rfork(const char *path, struct adouble *ad, int adflags)
     }
 
     /* make things invisible */
-    if ((*path == '.') && strcmp(path, ".") && strcmp(path, "..")) {
+    if ((ad->ad_options & ADVOL_INVDOTS) && (*path == '.') && strcmp(path, ".") && strcmp(path, "..")) {
         ashort = htons(ATTRBIT_INVISIBLE);
        ad_setattr(ad, ashort);
        ashort = htons(FINDERINFO_INVISIBLE);
-       memcpy(ad_entry(ad, ADEID_FINDERI) + FINDERINFO_FRFLAGOFF,
-                    &ashort, sizeof(ashort));
+       memcpy(ad_entry(ad, ADEID_FINDERI) + FINDERINFO_FRFLAGOFF, &ashort, sizeof(ashort));
     }
 
     if (stat(path, &st) < 0) {