diff --git a/0004-Black-list-wont-t-work-when-block-home-location.patch b/0004-Black-list-wont-t-work-when-block-home-location.patch new file mode 100644 index 0000000..38c64bd --- /dev/null +++ b/0004-Black-list-wont-t-work-when-block-home-location.patch @@ -0,0 +1,36 @@ +From 5cd5f93db4c72b048ad7da484ee6237fabb4a023 Mon Sep 17 00:00:00 2001 +From: tanyulong +Date: Mon, 1 Nov 2021 14:12:50 +0800 +Subject: [PATCH] Black list wont't work when block home location + +--- + libsearch/index/search-manager.cpp | 6 +++++- + 1 file changed, 5 insertions(+), 1 deletion(-) + +diff --git a/libsearch/index/search-manager.cpp b/libsearch/index/search-manager.cpp +index c501594..5f1ea8a 100644 +--- a/libsearch/index/search-manager.cpp ++++ b/libsearch/index/search-manager.cpp +@@ -398,6 +398,10 @@ DirectSearch::DirectSearch(QString keyword, QQueue *searchResultFile, Q + } + + void DirectSearch::run() { ++ QStringList blockList = GlobalSettings::getInstance()->getBlockDirs(); ++ if(blockList.contains(QStandardPaths::writableLocation(QStandardPaths::HomeLocation).remove(0,1), Qt::CaseSensitive)) { ++ return; ++ } + QQueue bfs; + bfs.enqueue(QStandardPaths::writableLocation(QStandardPaths::HomeLocation)); + QFileInfoList list; +@@ -405,7 +409,7 @@ void DirectSearch::run() { + // QDir::Hidden + dir.setFilter(QDir::Dirs | QDir::Files | QDir::NoDotAndDotDot); + dir.setSorting(QDir::DirsFirst); +- QStringList blockList = GlobalSettings::getInstance()->getBlockDirs(); ++ //QStringList blockList = GlobalSettings::getInstance()->getBlockDirs(); + while(!bfs.empty()) { + dir.setPath(bfs.dequeue()); + list = dir.entryInfoList(); +-- +2.30.0 + diff --git a/ukui-search.spec b/ukui-search.spec index e0136dc..6367055 100644 --- a/ukui-search.spec +++ b/ukui-search.spec @@ -2,7 +2,7 @@ Name: ukui-search Version: 0.4.1 -Release: 4 +Release: 5 Summary: Advanced ukui menu License: GPL-3.0 URL: http://www.ukui.org @@ -11,6 +11,7 @@ Source0: %{name}-%{version}.tar.gz Patch0: 0001-Update-changelog.patch Patch1: 0002-fix-Index-crash-when-meet-encrypt-doc-files.patch Patch2: 0003-File-name-is-obscured-when-it-s-too-long-in-detail-page.patch +Patch3: 0004-Black-list-wont-t-work-when-block-home-location.patch BuildRequires: pkgconf BuildRequires: gsettings-qt-devel @@ -88,6 +89,7 @@ permanent. %patch0 -p1 %patch1 -p1 %patch2 -p1 +%patch3 -p1 %build mkdir build && cd build @@ -139,6 +141,9 @@ rm -rf $RPM_BUILD_ROOT %changelog +* Mon Nov 1 2021 tanyulong - 0.4.1-5 +- fix Black list wont't work when block home location + * Mon Nov 1 2021 tanyulong - 0.4.1-4 - fix File name is obscured when it's too long in detail page