Fixed error message of unexistent directory when the logs path is empty
This commit is contained in:
Valentino Orlandi 2024-03-01 21:37:41 +01:00
parent f31abb364b
commit 71ab2b999c
Signed by: elB4RTO
GPG Key ID: 1719E976DB2D4E71
2 changed files with 6 additions and 4 deletions

View File

@ -2788,10 +2788,10 @@ void MainWindow::refreshFinished()
// refresh finished, back to normal state
if ( this->craplog.getLogsListSize() > 0ul ) {
this->ui->checkBox_LogFiles_CheckAll->setEnabled( true );
this->ui->button_LogFiles_RefreshList->setEnabled( true );
this->ui->button_LogFiles_ViewFile->setEnabled( true );
this->ui->listLogFiles->setEnabled( true );
}
this->ui->button_LogFiles_RefreshList->setEnabled( true );
this->ui->button_LogFiles_ViewFile->setEnabled( true );
this->ui->button_LogFiles_Apache->setEnabled( true );
this->ui->button_LogFiles_Nginx->setEnabled( true );
this->ui->button_LogFiles_Iis->setEnabled( true );

View File

@ -37,8 +37,10 @@ void CraplogLister::work()
const std::string& logs_path{ this->logs_path };
if ( ! IOutils::isDir( logs_path ) ) {
// this directory doesn't exists
emit this->showDialog( WorkerDialog::errDirNotExists,
{QString::fromStdString( logs_path )} );
if ( ! logs_path.empty() ) {
emit this->showDialog( WorkerDialog::errDirNotExists,
{QString::fromStdString( logs_path )} );
}
this->quit();
return;
}