mirror of
git://git.code.sf.net/p/zsh/code
synced 2025-01-01 17:24:50 +01:00
users/12087: fix globbing problem on Cygwin
This commit is contained in:
parent
6567e77a4e
commit
988be99034
2 changed files with 25 additions and 1 deletions
|
@ -1,3 +1,8 @@
|
|||
2007-10-23 Peter Stephenson <pws@csr.com>
|
||||
|
||||
* users/12087: fix a case where we doing globbing unncessarily to
|
||||
find files case-insensitively in Cygwin.
|
||||
|
||||
2007-10-22 Peter Stephenson <pws@csr.com>
|
||||
|
||||
* 24007: Src/prompt.c, Src/utils.c: mildly suspicious things
|
||||
|
|
|
@ -1167,7 +1167,26 @@ patcomppiece(int *flagp)
|
|||
* ..(#a1).. (i.e. the (#a1) has no effect), but if you're
|
||||
* going to write funny patterns, you get no sympathy from me.
|
||||
*/
|
||||
if (patglobflags & (0xFF|GF_LCMATCHUC|GF_IGNCASE)) {
|
||||
if (patglobflags &
|
||||
#ifdef __CYGWIN__
|
||||
/*
|
||||
* As above: don't use pattern matching for files
|
||||
* just because of case insensitivity if file system
|
||||
* is known to be case insensitive.
|
||||
*
|
||||
* This is known to be necessary in at least one case:
|
||||
* if "mount -c /" is in effect, so that drives appear
|
||||
* directly under / instead of the usual /cygdrive, they
|
||||
* aren't shown by readdir(). So it's vital we don't use
|
||||
* globbing to find "/c", since that'll fail.
|
||||
*/
|
||||
((patflags & PAT_FILE) ?
|
||||
(0xFF|GF_LCMATCHUC) :
|
||||
(0xFF|GF_LCMATCHUC|GF_IGNCASE))
|
||||
#else
|
||||
(0xFF|GF_LCMATCHUC|GF_IGNCASE)
|
||||
#endif
|
||||
) {
|
||||
if (!(patflags & PAT_FILE))
|
||||
flags &= ~P_PURESTR;
|
||||
else if (!(nptr[0] == '.' &&
|
||||
|
|
Loading…
Reference in a new issue