!5 Black list wont't work when block home location
From: @tanyulong2021 Reviewed-by: @pei-jiankang Signed-off-by: @pei-jiankang
This commit is contained in:
commit
ad632d0368
36
0004-Black-list-wont-t-work-when-block-home-location.patch
Normal file
36
0004-Black-list-wont-t-work-when-block-home-location.patch
Normal file
@ -0,0 +1,36 @@
|
|||||||
|
From 5cd5f93db4c72b048ad7da484ee6237fabb4a023 Mon Sep 17 00:00:00 2001
|
||||||
|
From: tanyulong <tanyulong@kylinos.cn>
|
||||||
|
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<QString> *searchResultFile, Q
|
||||||
|
}
|
||||||
|
|
||||||
|
void DirectSearch::run() {
|
||||||
|
+ QStringList blockList = GlobalSettings::getInstance()->getBlockDirs();
|
||||||
|
+ if(blockList.contains(QStandardPaths::writableLocation(QStandardPaths::HomeLocation).remove(0,1), Qt::CaseSensitive)) {
|
||||||
|
+ return;
|
||||||
|
+ }
|
||||||
|
QQueue<QString> 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
|
||||||
|
|
||||||
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
Name: ukui-search
|
Name: ukui-search
|
||||||
Version: 0.4.1
|
Version: 0.4.1
|
||||||
Release: 4
|
Release: 5
|
||||||
Summary: Advanced ukui menu
|
Summary: Advanced ukui menu
|
||||||
License: GPL-3.0
|
License: GPL-3.0
|
||||||
URL: http://www.ukui.org
|
URL: http://www.ukui.org
|
||||||
@ -11,6 +11,7 @@ Source0: %{name}-%{version}.tar.gz
|
|||||||
Patch0: 0001-Update-changelog.patch
|
Patch0: 0001-Update-changelog.patch
|
||||||
Patch1: 0002-fix-Index-crash-when-meet-encrypt-doc-files.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
|
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: pkgconf
|
||||||
BuildRequires: gsettings-qt-devel
|
BuildRequires: gsettings-qt-devel
|
||||||
@ -88,6 +89,7 @@ permanent.
|
|||||||
%patch0 -p1
|
%patch0 -p1
|
||||||
%patch1 -p1
|
%patch1 -p1
|
||||||
%patch2 -p1
|
%patch2 -p1
|
||||||
|
%patch3 -p1
|
||||||
|
|
||||||
%build
|
%build
|
||||||
mkdir build && cd build
|
mkdir build && cd build
|
||||||
@ -139,6 +141,9 @@ rm -rf $RPM_BUILD_ROOT
|
|||||||
|
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Mon Nov 1 2021 tanyulong <tanyulong@kylinos.cn> - 0.4.1-5
|
||||||
|
- fix Black list wont't work when block home location
|
||||||
|
|
||||||
* Mon Nov 1 2021 tanyulong <tanyulong@kylinos.cn> - 0.4.1-4
|
* Mon Nov 1 2021 tanyulong <tanyulong@kylinos.cn> - 0.4.1-4
|
||||||
- fix File name is obscured when it's too long in detail page
|
- fix File name is obscured when it's too long in detail page
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user