|
|
@ -33,6 +33,9 @@
|
|
|
|
#include <dcopref.h>
|
|
|
|
#include <dcopref.h>
|
|
|
|
#include <dcopclient.h>
|
|
|
|
#include <dcopclient.h>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#include <sys/stat.h> // TDEIO does not seem to have what we need
|
|
|
|
|
|
|
|
|
|
|
|
using namespace KlamAV;
|
|
|
|
using namespace KlamAV;
|
|
|
|
|
|
|
|
|
|
|
|
Klamscan::Klamscan(TQWidget *parent, const char *name)
|
|
|
|
Klamscan::Klamscan(TQWidget *parent, const char *name)
|
|
|
@ -477,9 +480,26 @@ TQStringList Klamscan::pruneSelectedDirs(){
|
|
|
|
listOfUrlsToScan.sort();
|
|
|
|
listOfUrlsToScan.sort();
|
|
|
|
TQString prev;
|
|
|
|
TQString prev;
|
|
|
|
TQStringList prevdirs;
|
|
|
|
TQStringList prevdirs;
|
|
|
|
|
|
|
|
struct stat sb;
|
|
|
|
for (TQStringList::Iterator it = listOfUrlsToScan.begin(); it != listOfUrlsToScan.end(); it++ ){
|
|
|
|
for (TQStringList::Iterator it = listOfUrlsToScan.begin(); it != listOfUrlsToScan.end(); it++ ){
|
|
|
|
//kdDebug() << "dir: " << (*it) << endl;
|
|
|
|
//kdDebug() << "dir: " << (*it) << endl;
|
|
|
|
(*it) = (*it).stripWhiteSpace() + "/";
|
|
|
|
(*it) = (*it).stripWhiteSpace();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// replace block devices with mountpoints
|
|
|
|
|
|
|
|
lstat( (*it), &sb );
|
|
|
|
|
|
|
|
if ( (sb.st_mode & S_IFMT) == S_IFBLK ) {
|
|
|
|
|
|
|
|
// This is actually from directorylist.cpp
|
|
|
|
|
|
|
|
DCOPRef mediamanager("kded", "mediamanager");
|
|
|
|
|
|
|
|
DCOPReply reply = mediamanager.call( "properties", (*it) );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
TQStringList properties;
|
|
|
|
|
|
|
|
reply.get( properties, "TQStringList" );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
(*it) = * (properties.at(7) );
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
(*it) = (*it) + "/";
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if (prevdirs.isEmpty()){
|
|
|
|
if (prevdirs.isEmpty()){
|
|
|
|
//kdDebug() << (*it) << endl;
|
|
|
|
//kdDebug() << (*it) << endl;
|
|
|
|
filepattern.append(*it);
|
|
|
|
filepattern.append(*it);
|
|
|
|