This is the mail archive of the glibc-bugs@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug glob/22513] New: If patterns has a trailing slash then glob has to match directories only


https://sourceware.org/bugzilla/show_bug.cgi?id=22513

            Bug ID: 22513
           Summary: If patterns has a trailing slash then glob has to
                    match directories only
           Product: glibc
           Version: unspecified
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: glob
          Assignee: unassigned at sourceware dot org
          Reporter: dgoncharov at users dot sf.net
  Target Milestone: ---

If patterns has a trailing slash then glob has to match directories only.

http://pubs.opengroup.org/onlinepubs/9699919799/.

Here posix specifies
"An ordinary character is a pattern that shall match itself. It can be any
character in the supported character set except for NUL, those special shell
characters in Quoting that require quoting, and the following three special
pattern characters."

If the pattern is only 2 characters long (e.g. */) glob already matches
directories only. If the pattern is longer e.g. hello*/ then glob matches only
directories or files and directoires depending on type in readdir_result.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]