data: Still allow project refresh if database file can't be loaded
This commit is contained in:
@@ -121,7 +121,17 @@ void Project::load()
|
||||
canLoad = true;
|
||||
}
|
||||
|
||||
m_storage->setup();
|
||||
try
|
||||
{
|
||||
m_storage->setup();
|
||||
}
|
||||
catch(...)
|
||||
{
|
||||
LOG_ERROR_STREAM(<< "Exception during storage loading.");
|
||||
|
||||
canLoad = false;
|
||||
m_state = PROJECT_STATE_DB_CORRUPTED;
|
||||
}
|
||||
|
||||
m_sourceGroups = SourceGroupFactory::getInstance()->createSourceGroups(m_settings->getAllSourceGroupSettings());
|
||||
|
||||
@@ -197,6 +207,12 @@ void Project::refresh(RefreshMode refreshMode, DialogView* dialogView)
|
||||
"the project fully reindexed. Do you want to update the project file and reindex the project?";
|
||||
needsFullRefresh = true;
|
||||
|
||||
case PROJECT_STATE_DB_CORRUPTED:
|
||||
question =
|
||||
"There was a problem loading the index of this project. The project needs to get fully reindexed. "
|
||||
"Do you want to reindex the project?";
|
||||
needsFullRefresh = true;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user