log when moving sqlite dll fails

This commit is contained in:
UnknownShadow200 2018-07-20 05:16:33 +10:00
parent 58369eb962
commit fd7c23e1a3
4 changed files with 48 additions and 49 deletions

View File

@ -129,12 +129,11 @@ namespace MCGalaxy {
static void MoveSqliteDll() {
try {
if (File.Exists("sqlite3_x32.dll") && IntPtr.Size == 4)
File.Copy("sqlite3_x32.dll", "sqlite3.dll", true);
if (File.Exists("sqlite3_x64.dll") && IntPtr.Size == 8)
File.Copy("sqlite3_x64.dll", "sqlite3.dll", true);
} catch { }
string dll = IntPtr.Size == 8 ? "sqlite3_x64.dll" : "sqlite3_x32.dll";
if (File.Exists(dll)) File.Copy(dll, "sqlite3.dll", true);
} catch (Exception ex) {
Logger.LogError("Error moving SQLite dll", ex);
}
}
static void EnsureFilesExist() {