]> arthur.barton.de Git - netatalk.git/commitdiff
fix, simple casefolding for precreated special folders
authorbfernhomberg <bfernhomberg>
Sun, 29 Feb 2004 22:59:10 +0000 (22:59 +0000)
committerbfernhomberg <bfernhomberg>
Sun, 29 Feb 2004 22:59:10 +0000 (22:59 +0000)
etc/afpd/volume.c

index c00d719e5a60ab88ed1966288ba1c038f74182d1..2131b397e5c154f1bf6a1b856f81adb84657c55c 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: volume.c,v 1.51.2.7.2.21 2004-02-20 21:23:13 didg Exp $
+ * $Id: volume.c,v 1.51.2.7.2.22 2004-02-29 22:59:10 bfernhomberg Exp $
  *
  * Copyright (c) 1990,1993 Regents of The University of Michigan.
  * All Rights Reserved.  See COPYRIGHT.
@@ -2011,7 +2011,7 @@ int wincheck(const struct vol *vol, const char *path)
  */
 static int create_special_folder (const struct vol *vol, const struct _special_folder *folder)
 {
-       char            *p;
+       char            *p,*q;
        struct adouble  ad;
        u_int16_t       attr;
        struct stat     st;
@@ -2027,6 +2027,16 @@ static int create_special_folder (const struct vol *vol, const struct _special_f
        strcat(p, "/");
        strcat(p, folder->name);
 
+       q=p;
+
+       while (*q) {
+               if ((vol->v_casefold & AFPVOL_MTOUUPPER))
+                       *q=toupper(*q);
+               else if ((vol->v_casefold & AFPVOL_MTOULOWER))
+                       *q=tolower(*q);
+               q++;
+       }
+
        if ( (ret = stat( p, &st )) < 0 ) {
                if (folder->precreate) {
                    if (ad_mkdir(p, folder->mode)) {