Make csh_glob remove quote-escaping backslashes
authorFather Chrysostomos <sprout@cpan.org>
Thu, 27 Oct 2011 21:26:15 +0000 (14:26 -0700)
committerFather Chrysostomos <sprout@cpan.org>
Thu, 27 Oct 2011 21:26:15 +0000 (14:26 -0700)
commite1621fc96189270d9aa78c1f2dbc2200bd15cb59
treec5666a57d92aac8fc7c438919f7cfdaf99e35524
parent040ac26489d0fa56b9bc1e898067e86d17ad5255
Make csh_glob remove quote-escaping backslashes

This commit does not change the output on Unix.  On Windows, where the
globbing engine does not usually treat backslashes as escapes, this
restores the behaviour to what it was before commit 0b0e6d70, for
cases like glob('a\"b c\"d').

Before 0b0e6d70, the preprocessing done by csh_glob (which it out-
sourced to Text::ParseWords) would remove backslash escapes, so the
globbing engine got to see a"b and c"d.

Since 0b0e6d70, the backslash escapes were no longer removed (because
in most cases they needed to remain, to avoid backslashitis), so the
globbing engine got to see a\"b and c\"d.  On Unix that made no dif-
ference, as the globbing engine treats \ as an escape character.  But
on Windows it doesn’t usually, so the output changed and produced a
literal a\"b.

This commit strips out quote-escaping backslashes in the prepro-
cessing code.
ext/File-Glob/Glob.xs
ext/File-Glob/t/basic.t