fix: temp fix for 4-series shenanagans

This commit is contained in:
Drew Tingen
2020-05-21 18:14:10 -04:00
committed by Chris Cameron
parent dbad18925f
commit 4de7944286

View File

@@ -428,18 +428,13 @@ namespace ICD.Common.Utils.Globalization
} }
s_SqlConnectionString = string.Format(SQL_CONNECTION_STRING_FORMAT, databasePath); s_SqlConnectionString = string.Format(SQL_CONNECTION_STRING_FORMAT, databasePath);
using (IcdSqliteConnection sQLiteConnection = new IcdSqliteConnection(s_SqlConnectionString))
{
try try
{ {
sQLiteConnection.Open(); using (IcdSqliteConnection sQLiteConnection = new IcdSqliteConnection(s_SqlConnectionString))
}
catch (Exception)
{ {
s_IsDatabasePresent = false; sQLiteConnection.Open();
return;
}
s_IsDatabasePresent = true; s_IsDatabasePresent = true;
IcdSqliteCommand sQLiteCommand = new IcdSqliteCommand("select count(*) from cultureinfo", sQLiteConnection); IcdSqliteCommand sQLiteCommand = new IcdSqliteCommand("select count(*) from cultureinfo", sQLiteConnection);
int num = Convert.ToInt32(sQLiteCommand.ExecuteScalar()); int num = Convert.ToInt32(sQLiteCommand.ExecuteScalar());
s_AvailableCultureNames = new string[num + 1]; s_AvailableCultureNames = new string[num + 1];
@@ -470,6 +465,12 @@ namespace ICD.Common.Utils.Globalization
} }
} }
} }
}
catch (Exception)
{
s_IsDatabasePresent = false;
return;
}
foreach (string name in builtinCultures) foreach (string name in builtinCultures)
{ {