* src/list.c (enforce_one_top_level): Do not strip prefixes like
"../" (which should not be allowed unless -P) and ".../" (which
are ordinary file names). The "../" not being allowed should be
addressed in a different way.
char *file_name = *pfile_name;
char *p;
- for (p = file_name; *p && (ISSLASH (*p) || *p == '.'); p++)
- ;
+ for (p = file_name; ; p++)
+ {
+ bool dot = p[0] == '.';
+ if (!ISSLASH (p[dot]))
+ {
+ p += dot & !p[dot];
+ break;
+ }
+ p += dot;
+ }
if (*p)
{