Since the search pattern is wrapped in double quotes for grep, the symbol ' (apostrophe) must not be escaped. Fixes #8776.

Signed-off-by: Matt Madia <mattmadia@gmail.com>
This commit is contained in:
x-ist 2012-08-02 19:35:45 +00:00 committed by Matt Madia
parent 817c114de7
commit 772f5f839c
1 changed files with 1 additions and 2 deletions

View File

@ -302,8 +302,7 @@ Grepper::_SetPattern(const char* src)
|| (c == '?') || (c == '*') || (c == '?') || (c == '*')
|| (c == '+') || (c == '-') || (c == '+') || (c == '-')
|| (c == ':') || (c == '^') || (c == ':') || (c == '^')
|| (c == '\'') || (c == '"') || (c == '"') || (c == '`')) {
|| (c == '`')) {
*dstPtr++ = '\\'; *dstPtr++ = '\\';
} else if ((c == '\\') || (c == '$')) { } else if ((c == '\\') || (c == '$')) {
// Some characters need to be escaped // Some characters need to be escaped