Bash-5.0 patch 1: fix pathname expansion of directory names containing backslashes

This commit is contained in:
Chet Ramey
2019-01-18 15:12:37 -05:00
parent d233b485e8
commit 4d2e315490
3 changed files with 60 additions and 10 deletions
-6
View File
@@ -54,17 +54,11 @@ INTERNAL_GLOB_PATTERN_P (pattern)
continue;
case L('\\'):
#if 0
/* Don't let the pattern end in a backslash (GMATCH returns no match
if the pattern ends in a backslash anyway), but otherwise return 1,
since the matching engine uses backslash as an escape character
and it can be removed. */
return (*p != L('\0'));
#else
/* The pattern may not end with a backslash. */
if (*p++ == L('\0'))
return 0;
#endif
}
return 0;