|
|
@ -213,7 +213,7 @@ int KlamDB::listdb(const char *filename)
|
|
|
|
|
|
|
|
|
|
|
|
KTempFile* tn = new KTempFile(tf->name());
|
|
|
|
KTempFile* tn = new KTempFile(tf->name());
|
|
|
|
|
|
|
|
|
|
|
|
if((tmpd = fopen(tn->name(), "wb+")) == NULL) {
|
|
|
|
if((tmpd = fopen(tn->name().ascii(), "wb+")) == NULL) {
|
|
|
|
printf("!listdb(): Can't create temporary file \n");
|
|
|
|
printf("!listdb(): Can't create temporary file \n");
|
|
|
|
delete tf;
|
|
|
|
delete tf;
|
|
|
|
delete tn;
|
|
|
|
delete tn;
|
|
|
@ -231,9 +231,9 @@ int KlamDB::listdb(const char *filename)
|
|
|
|
fflush(tmpd);
|
|
|
|
fflush(tmpd);
|
|
|
|
fseek(tmpd, 0L, SEEK_SET);
|
|
|
|
fseek(tmpd, 0L, SEEK_SET);
|
|
|
|
|
|
|
|
|
|
|
|
if(cli_untgz(fileno(tmpd), tf->name())) {
|
|
|
|
if(cli_untgz(fileno(tmpd), tf->name().ascii())) {
|
|
|
|
printf("!listdb(): Can't unpack CVD file.\n");
|
|
|
|
printf("!listdb(): Can't unpack CVD file.\n");
|
|
|
|
cli_rmdirs(tf->name());
|
|
|
|
cli_rmdirs(tf->name().ascii());
|
|
|
|
delete tf;
|
|
|
|
delete tf;
|
|
|
|
delete tn;
|
|
|
|
delete tn;
|
|
|
|
fclose(tmpd);
|
|
|
|
fclose(tmpd);
|
|
|
@ -246,9 +246,9 @@ int KlamDB::listdb(const char *filename)
|
|
|
|
/* wrapper end */
|
|
|
|
/* wrapper end */
|
|
|
|
|
|
|
|
|
|
|
|
/* list extracted directory */
|
|
|
|
/* list extracted directory */
|
|
|
|
listdir(tf->name());
|
|
|
|
listdir(tf->name().ascii());
|
|
|
|
|
|
|
|
|
|
|
|
cli_rmdirs(tf->name());
|
|
|
|
cli_rmdirs(tf->name().ascii());
|
|
|
|
delete tf;
|
|
|
|
delete tf;
|
|
|
|
|
|
|
|
|
|
|
|
return 0;
|
|
|
|
return 0;
|
|
|
@ -697,7 +697,7 @@ void KlamDB::shouldIShow(TQWidget * current)
|
|
|
|
if ((current == this) && (!(loadinprogress))){
|
|
|
|
if ((current == this) && (!(loadinprogress))){
|
|
|
|
TQString db = tdemain->freshklam->getCurrentDBDir();
|
|
|
|
TQString db = tdemain->freshklam->getCurrentDBDir();
|
|
|
|
|
|
|
|
|
|
|
|
if (checkdir((const char *)db) == -1){
|
|
|
|
if (checkdir(db.ascii()) == -1){
|
|
|
|
kdDebug() << "returned -1" << endl;
|
|
|
|
kdDebug() << "returned -1" << endl;
|
|
|
|
location = locate("data", "klamav/about/nodb.html");
|
|
|
|
location = locate("data", "klamav/about/nodb.html");
|
|
|
|
homepage->openURL(location);
|
|
|
|
homepage->openURL(location);
|
|
|
@ -731,7 +731,7 @@ void KlamDB::shouldIShow(TQWidget * current)
|
|
|
|
|
|
|
|
|
|
|
|
// TQString db = tdemain->freshklam->getCurrentDBDir();
|
|
|
|
// TQString db = tdemain->freshklam->getCurrentDBDir();
|
|
|
|
|
|
|
|
|
|
|
|
listdir((const char *)db);
|
|
|
|
listdir(db.ascii());
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
prog->setProgress (sigs);
|
|
|
|
prog->setProgress (sigs);
|
|
|
@ -746,7 +746,7 @@ void KlamDB::shouldIShow(TQWidget * current)
|
|
|
|
|
|
|
|
|
|
|
|
memset(dbstat, 0, sizeof(struct cl_stat));
|
|
|
|
memset(dbstat, 0, sizeof(struct cl_stat));
|
|
|
|
|
|
|
|
|
|
|
|
cl_statinidir((const char *)db, dbstat);
|
|
|
|
cl_statinidir(db.ascii(), dbstat);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
loadinprogress = false;
|
|
|
|
loadinprogress = false;
|
|
|
@ -800,7 +800,7 @@ unsigned int KlamDB::getSigNos()
|
|
|
|
return 0;
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
ret = cl_load((const char *)dbdir, engine, &no, CL_DB_STDOPT);
|
|
|
|
ret = cl_load(dbdir.ascii(), engine, &no, CL_DB_STDOPT);
|
|
|
|
cl_engine_free(engine);
|
|
|
|
cl_engine_free(engine);
|
|
|
|
|
|
|
|
|
|
|
|
kdDebug() << "no of sigs" << no << endl;
|
|
|
|
kdDebug() << "no of sigs" << no << endl;
|
|
|
|