Bug 378884 - baloosearch doesn't respect --directory parameter
Summary: baloosearch doesn't respect --directory parameter
Status: RESOLVED FIXED
Alias: None
Product: frameworks-baloo
Classification: Frameworks and Libraries
Component: Engine (show other bugs)
Version: 5.33.0
Platform: Fedora RPMs Linux
: NOR normal
Target Milestone: ---
Assignee: Pinak Ahuja
URL:
Keywords:
: 379665 (view as bug list)
Depends on:
Blocks:
 
Reported: 2017-04-17 17:57 UTC by Saman
Modified: 2017-10-31 06:39 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Saman 2017-04-17 17:57:41 UTC
When I try to limit the search with --directory, I'll see the result from other sibling directories. For example:

$ pwd
/home/foo/Music Video/Imagine Dragons
$ baloosearch -d . ""

I can see unexpected results such as:

/home/foo/Music Video/Infernal/ 

but I only see the unexpected results from sibling directories. It seems it limit the result to the parent directory (--directory /home/foo/Music Video).
Comment 1 glyphimor 2017-07-15 04:53:50 UTC
Just confirming this affects me as well. System is gentoo, package is kde-frameworks/baloo-5.34.0.

Some quick commands to test:

cd ~/tmp
mkdir kde-search-test
cd kde-search-test
mkdir dir1
mkdir dir2
touch dir1/rareword.txt
touch dir2/rareword.txt
cd ..
baloosearch filename:rareword
baloosearch filename:rareword --directory kde-search-test/dir1/

(Might have to run "balooctl index kde-search-test/", etc. for the files to get indexed, before running baloosearch.)

The baloosearch command simply ignores the --directory parameter.

This would perhaps not be too severe if it just affected the baloosearch command; unfortunately, it's also affecting programs tying into baloo. See, for example, bug 379665, 'search is not working in "from here"', filed under dolphin. There, we see basically the same behavior: dolphin returns search results from the entire system, ignoring the "from here" switch that's supposed to restrict results to the current directory.
Comment 2 Nate Graham 2017-10-27 16:52:07 UTC
*** Bug 379665 has been marked as a duplicate of this bug. ***
Comment 3 Nate Graham 2017-10-28 02:54:09 UTC
Fixed by KF 5.38.0.
Comment 4 p92 2017-10-31 06:39:08 UTC
I confirm it works OK in kubuntu 1710