Menu

#5 case statements not properly handling backslash in pathnames

1.0
closed
None
2018-05-01
2018-04-30
No
case "$name" in
\\*) echo root dir 
           ;;
 esac

is not properly handling the \ in the pattern. call to fnmatch(name,name,options) is not working because of missing FNM_NOESCAPE option.

Discussion

  • Lowell Boggs, Jr.

    • status: open --> closed
    • assigned_to: Lowell Boggs, Jr.
     
  • Lowell Boggs, Jr.

    the change is made to lib\file.c. Calls to fnmatch() that were previously only taking FNM_PATHNAME, now take a macro that includes FNM_PATHNAME | FNM_INSENSITIVE | FNM_NOESCAPE.

     

Log in to post a comment.