Summary: | grep component fails to search with spaces in path | ||
---|---|---|---|
Product: | [Applications] kdevelop | Reporter: | Michal Ceresna <michal.ceresna> |
Component: | general | Assignee: | KDevelop Developers <kdevelop-devel> |
Status: | RESOLVED FIXED | ||
Severity: | normal | ||
Priority: | NOR | ||
Version: | 3.0.1 | ||
Target Milestone: | --- | ||
Platform: | Debian testing | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Sentry Crash Report: |
Description
Michal Ceresna
2004-03-11 13:01:37 UTC
A quick test says you're right.. strange no one had noticed before. Patch applied to HEAD, will backport if no problems appear. CVS commit by dagerbo: Fix bug #77278. Patch by Michal Ceresna. CCMAIL: 77278-done@bugs.kde.org M +5 -1 grepviewwidget.cpp 1.30 --- kdevelop/parts/grepview/grepviewwidget.cpp #1.29:1.30 @@ -196,4 +196,8 @@ void GrepViewWidget::searchActivated() command += "| grep -v \"CVS/\" "; } + + // quote spaces in filenames going to xargs + command += "| sed \"s/ /\\\\\\ /g\" "; + command += "| xargs " ; @@ -240,5 +244,5 @@ void GrepViewWidget::slotExecuted(QListB GrepListBoxItem *gi = static_cast<GrepListBoxItem*>(i); m_part->partController()->editDocument( KURL( gi->filename() ), gi->linenumber()-1 ); - m_part->mainWindow()->lowerView(this); +// m_part->mainWindow()->lowerView(this); } CVS commit by dagerbo: Fix bug #77278. Patch by Michal Ceresna. CCMAIL: 77278@bugs.kde.org M +6 -2 grepviewwidget.cpp 1.25.2.3 --- kdevelop/parts/grepview/grepviewwidget.cpp #1.25.2.2:1.25.2.3 @@ -196,4 +196,8 @@ void GrepViewWidget::searchActivated() command += "| grep -v \"CVS/\" "; } + + // quote spaces in filenames going to xargs + command += "| sed \"s/ /\\\\\\ /g\" "; + command += "| xargs " ; @@ -239,6 +243,6 @@ void GrepViewWidget::slotExecuted(QListB GrepListBoxItem *gi = static_cast<GrepListBoxItem*>(i); - m_part->partController()->editDocument( gi->filename(), gi->linenumber()-1 ); - m_part->mainWindow()->lowerView(this); + m_part->partController()->editDocument( KURL( gi->filename() ), gi->linenumber()-1 ); +// m_part->mainWindow()->lowerView(this); } |