Opened 8 years ago

Closed 8 years ago

#8776 closed bug (fixed)

[Text Search] Unable to find symbol < ' > in files where it does exist.

Reported by: x-ist Owned by: stippi
Priority: normal Milestone: R1
Component: Applications/TextSearch Version: R1/Development
Keywords: Text Search Cc:
Blocked By: Blocking:
Platform: x86


  1. Open Text Search in a source code directory like "<something>haiku/src/kits/tracker"
  2. Search for <AddShortcut> without braces. You'l see results like AddShortcut('Z')
  3. Now try to search <AddShortcut('>
  4. No results anymore
  5. Even if the text-string is copied from previously found files Text Search won't find it.

It seems Text Search does not like the <'> symbol.

Searching for < ' > symbol alone gives weird results too.

Attachments (1)

FixApostropheBug.patch (923 bytes ) - added by x-ist 8 years ago.

Download all attachments as: .zip

Change History (5)

comment:1 by anevilyak, 8 years ago

Component: - GeneralApplications/TextSearch
Owner: changed from nobody to stippi
Version: R1/alpha3R1/Development

Most likely an escaping issue when it invokes grep.

comment:2 by x-ist, 8 years ago

The problem is that since the search pattern is wrapped into double quotes (like "pattern") the symbol <'> as part of the double quoted string must not be escaped. However it is escaped in Line 305 of Grepper.cpp. Removing that escaping solves the issue.

Maybe someone with commit rights could remove that escaping. It's not worth a patch, oh?

by x-ist, 8 years ago

Attachment: FixApostropheBug.patch added

comment:3 by x-ist, 8 years ago

patch: 01
Version 0, edited 8 years ago by x-ist (next)

comment:4 by mmadia, 8 years ago

Resolution: fixed
Status: newclosed

Looks harmless. Applied in hrev44490. Thanks!

Note: See TracTickets for help on using tickets.