When Extended Filename Syntax (EFS) is in effect, it's legal for
directory names to contain dots that are not directory delimiters.
This commit escapes such dots when they are part of the file
portion of the fileified directory spec.
This gets two more of the vms/ext/filespec.t tests passing when
EFS is in effect.
/* The .dir for now, and fix this better later */
dirlen = cp2 - trndir;
}
+ if (decc_efs_charset) {
+ /* Dots are allowed in dir names, so escape them. */
+ char *cp4 = is_dir ? (cp2 - 1) : cp2;
+
+ for (; cp4 > cp1; cp4--) {
+ if (*cp4 == '.') {
+ if ((cp4 - 1 > trndir) && (*(cp4 - 1) != '^')) {
+ memmove(cp4 + 1, cp4, trndir + dirlen - cp4 + 1);
+ *cp4 = '^';
+ dirlen++;
+ }
+ }
+ }
+ }
}
}