]> arthur.barton.de Git - netatalk.git/commitdiff
Remove "hex encoding" and "use dots" options.
authorFrank Lahm <franklahm@googlemail.com>
Thu, 29 Mar 2012 17:16:35 +0000 (19:16 +0200)
committerFrank Lahm <franklahm@googlemail.com>
Thu, 29 Mar 2012 17:16:35 +0000 (19:16 +0200)
- CAP "hex encoding" is not done anymore for '/', instead its converted to a single ':', the same as OS X does locally
- "use dots": dots are always saved as is

bin/ad/ad_util.c
etc/afpd/enumerate.c
etc/afpd/filedir.c
etc/cnid_dbd/cmd_dbd_scanvol.c
include/atalk/directory.h
include/atalk/volume.h
libatalk/util/netatalk_conf.c
libatalk/vfs/vfs.c

index d994f74f56afa666fe8376d142c882fcf6a83aaa..682bc57c98190191bccdc5f6721315395b62d6d3 100644 (file)
@@ -216,15 +216,6 @@ int convert_dots_encoding(const afpvol_t *svol, const afpvol_t *dvol, char *path
         from = svol->vol->v_volcharset;
     }
 
-    if ( (svol->vol->v_path)
-         && ! (svol->vol->v_flags & AFPVOL_USEDOTS)
-         && (dvol->vol->v_flags & AFPVOL_USEDOTS)) {
-        /* source is without dots, destination is with */
-        flags |= CONV_UNESCAPEHEX;
-    } else if (! (dvol->vol->v_flags & AFPVOL_USEDOTS)) {
-        flags |= CONV_ESCAPEDOTS;
-    }
-
     int len = convert_charset(from,
                               dvol->vol->v_volcharset,
                               dvol->vol->v_maccharset,
index 021862e76a87e974ef54d399eff5f14527886c4a..f77d34a522a91ce702ff80599540791684586548 100644 (file)
@@ -353,7 +353,6 @@ static int enumerate(AFPObj *obj _U_, char *ibuf, size_t ibuflen _U_,
         s_path.u_name = sd.sd_last;
         if (ad_convert(sd.sd_last, &s_path.st, vol, &convname) == 0 && convname) {
             s_path.u_name = (char *)convname;
-            s_path.unconverted_name = sd.sd_last; /* Needed for CNID fixup */
         }
 
         if (of_stat( &s_path) < 0 ) {
index a04776fae35148b85735549221f22f0f2e479722..17473d19e7788adc542e8c95f8d66ed4b0e28e08 100644 (file)
@@ -203,9 +203,6 @@ int afp_setfildirparams(AFPObj *obj, char *ibuf, size_t ibuflen _U_, char *rbuf
 */
 int check_name(const struct vol *vol, char *name)
 {
-    if ((vol->v_flags & AFPVOL_NOHEX) && strchr(name, '/'))
-        return AFPERR_PARAM;
-
     if (!vol->vfs->vfs_validupath(vol, name)) {
         LOG(log_error, logtype_afpd, "check_name: illegal name: '%s'", name);
         return AFPERR_EXIST;
index 4baea635cadc5bcdf033f70e63b0476a59e599dd..6b486dc68c6da7127e3093df156d2095447669f9 100644 (file)
@@ -124,11 +124,6 @@ static char *mtoupath(char *mpath)
     }
 
     /* set conversion flags */
-    if (!(myvol->v_flags & AFPVOL_NOHEX))
-        flags |= CONV_ESCAPEHEX;
-    if (!(myvol->v_flags & AFPVOL_USEDOTS))
-        flags |= CONV_ESCAPEDOTS;
-
     if ((myvol->v_casefold & AFPVOL_MTOUUPPER))
         flags |= CONV_TOUPPER;
     else if ((myvol->v_casefold & AFPVOL_MTOULOWER))
index 06a56ac9736b3c81d6d7c942bd89f97b9bbced93..a2759aa18ca1cb455d73b0c1c6c3479a3c941882 100644 (file)
@@ -83,7 +83,6 @@ struct path {
     int         m_type;             /* mac name type (long name, unicode */
     char        *m_name;            /* mac name */
     char        *u_name;            /* unix name */
-    char        *unconverted_name;  /* NULL or u_name before ad_convert() conversion */
     cnid_t      id;                 /* file id (only for getmetadata) */
     struct dir  *d_dir;             /* */
     int         st_valid;           /* does st_errno and st set */
index d8948500e8eb86d57df8fc95236d7790016fd0f0..f5e995d28319c2be8665d2896f422c70eab35342 100644 (file)
@@ -114,8 +114,6 @@ struct vol {
 #define AFPVOL_NOV2TOEACONV (1 << 5) /* no adouble:v2 to adouble:ea conversion */
 #define AFPVOL_UNIX_CTXT (1 << 6)   /* volume created by getvolbypath ie UNIX access, not afpd AFP user session */
 #define AFPVOL_RO        (1 << 8)   /* read-only volume */
-#define AFPVOL_NOHEX     (1 << 10)  /* don't do :hex translation */
-#define AFPVOL_USEDOTS   (1 << 11)  /* use real dots */
 #define AFPVOL_NOSTAT    (1 << 16)  /* advertise the volume even if we can't stat() it
                                      * maybe because it will be mounted later in preexec */
 #define AFPVOL_UNIX_PRIV (1 << 17)  /* support unix privileges */
index 41ac7bf31b6d628b8b39c634056379bd136e39b3..d06be264051bdd9de82934deddfa753bd4ec32ea 100644 (file)
@@ -719,10 +719,6 @@ static struct vol *creatvol(AFPObj *obj,
 
     if (getoption_bool(obj->iniconfig, section, "read only", preset, 0))
         volume->v_flags |= AFPVOL_RO;
-    if (!getoption_bool(obj->iniconfig, section, "hex encoding", preset, 0))
-        volume->v_flags |= AFPVOL_NOHEX;
-    if (getoption_bool(obj->iniconfig, section, "use dots", preset, 1))
-        volume->v_flags |= AFPVOL_USEDOTS;
     if (getoption_bool(obj->iniconfig, section, "invisible dots", preset, 0))
         volume->v_flags |= AFPVOL_INV_DOTS;
     if (!getoption_bool(obj->iniconfig, section, "stat vol", preset, 1))
@@ -771,12 +767,6 @@ static struct vol *creatvol(AFPObj *obj,
         volume->v_ad_options |= ADVOL_INVDOTS;
 
     /* Mac to Unix conversion flags*/
-    if (!(volume->v_flags & AFPVOL_NOHEX)) {
-        volume->v_mtou_flags |= CONV_ESCAPEHEX;
-        volume->v_utom_flags |= CONV_UNESCAPEHEX;
-    }
-    if (!(volume->v_flags & AFPVOL_USEDOTS))
-        volume->v_mtou_flags |= CONV_ESCAPEDOTS;
     if ((volume->v_flags & AFPVOL_EILSEQ))
         volume->v_mtou_flags |= CONV__EILSEQ;
 
index 738e3b837851abc278296f05ebe6d038559dcbc6..8495d8c22fba19dd88789b82c6822bfb4a4fb3d6 100644 (file)
@@ -103,9 +103,6 @@ static int validupath_adouble(VFS_FUNC_ARGS_VALIDUPATH)
     if (name[0] != '.')
         return 1;
     
-    if (!(vol->v_flags & AFPVOL_USEDOTS))
-        return 0;
-        
     return netatalk_name(name) && strcmp(name,".AppleDouble") && strcasecmp(name,".Parent");
 }                                           
 
@@ -467,9 +464,6 @@ static int validupath_ea(VFS_FUNC_ARGS_VALIDUPATH)
     if (name[0] != '.')
         return 1;
     
-    if (!(vol->v_flags & AFPVOL_USEDOTS))
-        return 0;
-
 #ifndef HAVE_EAFD
     if (name[1] == '_')
         return ad_valid_header_osx(name);