summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMavridis Philippe <[email protected]>2021-02-19 12:41:58 +0200
committerMavridis Philippe <[email protected]>2021-02-19 12:41:58 +0200
commit9bbac10f3cbbb5b2ae94309149cf91f28cb8707d (patch)
tree723c8dd4feddf9bde2e5bdd36566525aea095b24 /src
parentc9462edae6160a16f11d7a572fe01c9f4e1b78cd (diff)
downloadklamav-9bbac10f3cbbb5b2ae94309149cf91f28cb8707d.tar.gz
klamav-9bbac10f3cbbb5b2ae94309149cf91f28cb8707d.zip
CollectionSetup: modified pruneSelectedDirs() to accept an argument
instead of reading the widget by itself. It is now possible to call CollectionSetup::pruneSelectedDirs(dirs) independently from a CollectionSetup object. Signed-off-by: Mavridis Philippe <[email protected]>
Diffstat (limited to 'src')
-rw-r--r--src/directorylist.cpp3
-rw-r--r--src/directorylist.h2
-rw-r--r--src/klamscan.cpp4
3 files changed, 4 insertions, 5 deletions
diff --git a/src/directorylist.cpp b/src/directorylist.cpp
index a817e2e..c24d552 100644
--- a/src/directorylist.cpp
+++ b/src/directorylist.cpp
@@ -476,13 +476,12 @@ DeviceItem::mountDevice( const TQString & device)
}
}
-TQStringList CollectionSetup::pruneSelectedDirs(){
+TQStringList CollectionSetup::pruneSelectedDirs( TQStringList listOfUrls ){
// This gets rid of redundant sub-directories
// from the list of dirs to be scanned.
TQStringList filepattern;
- TQStringList listOfUrls = dirs();
listOfUrls.sort();
TQString prev;
diff --git a/src/directorylist.h b/src/directorylist.h
index 8b15f22..3aaaf0b 100644
--- a/src/directorylist.h
+++ b/src/directorylist.h
@@ -48,7 +48,7 @@ public:
TQStringList m_dirs;
TQMap<TQString,int> m_refcount;
- TQStringList pruneSelectedDirs();
+ static TQStringList pruneSelectedDirs( TQStringList listOfUrls = 0 );
void writeConfig( const char* optGroup, const char* optName );
signals:
diff --git a/src/klamscan.cpp b/src/klamscan.cpp
index 0e0812e..1b04aca 100644
--- a/src/klamscan.cpp
+++ b/src/klamscan.cpp
@@ -253,7 +253,7 @@ void Klamscan::slotScan()
prevdir = listOfUrlsToScan.first();
}else{
- filepattern = setup->pruneSelectedDirs();
+ filepattern = setup->pruneSelectedDirs(setup->dirs());
}
scan( filepattern );
@@ -302,7 +302,7 @@ void Klamscan::slotAdvOptions(){
void Klamscan::slotSchedule(){
- TQStringList filepattern = setup->pruneSelectedDirs();
+ TQStringList filepattern = setup->pruneSelectedDirs(setup->dirs());
if (filepattern.isEmpty()){