GUI indexing: only ask a confirmation about resetting the index if the dbdir currently exists
This commit is contained in:
parent
b8e062f66c
commit
02a4a69482
@ -379,9 +379,12 @@ void RclMain::rebuildIndex()
|
|||||||
LOGERR("RclMain::rebuildIndex: current indexer exec not null\n" );
|
LOGERR("RclMain::rebuildIndex: current indexer exec not null\n" );
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
int rep = QMessageBox::warning(
|
int rep = QMessageBox::Ok;
|
||||||
0, tr("Erasing index"), tr("Reset the index and start from scratch ?"),
|
if (path_exists(theconfig->getDbDir())) {
|
||||||
QMessageBox::Ok, QMessageBox::Cancel, QMessageBox::NoButton);
|
rep = QMessageBox::warning(
|
||||||
|
0, tr("Erasing index"), tr("Reset the index and start from scratch ?"),
|
||||||
|
QMessageBox::Ok, QMessageBox::Cancel, QMessageBox::NoButton);
|
||||||
|
}
|
||||||
if (rep == QMessageBox::Ok) {
|
if (rep == QMessageBox::Ok) {
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
// Under windows, it is necessary to close the db here,
|
// Under windows, it is necessary to close the db here,
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user