Fixed DB updater reapplying a old update cause of different file hash, It should only check for different hashes when its not archived.

This commit is contained in:
hondacrx
2017-11-28 12:38:09 -05:00
parent 9f75b472a2
commit 74744327a4
2 changed files with 7 additions and 3 deletions
+4
View File
@@ -61,3 +61,7 @@
#*.PDF diff=astextplain #*.PDF diff=astextplain
#*.rtf diff=astextplain #*.rtf diff=astextplain
#*.RTF diff=astextplain #*.RTF diff=astextplain
###############################################################################
# override Language definition for .sql files
*.sql linguist-language=csharp
+3 -3
View File
@@ -51,10 +51,10 @@ namespace Framework.Database
fileName = @"\sql\base\characters_database.sql"; fileName = @"\sql\base\characters_database.sql";
break; break;
case "WorldDatabase": case "WorldDatabase":
fileName = @"\TDB_world_703.00_2016_10_17.sql"; fileName = @"\TDB_world_720.00_2017_04_18.sql";
break; break;
case "HotfixDatabase": case "HotfixDatabase":
fileName = @"\TDB_hotfixes_703.00_2016_10_17.sql"; fileName = @"\TDB_hotfixes_720.00_2017_04_18.sql";
break; break;
} }
@@ -171,7 +171,7 @@ namespace Framework.Database
else else
{ {
// If the hash of the files differs from the one stored in our database reapply the update (because it was changed). // If the hash of the files differs from the one stored in our database reapply the update (because it was changed).
if (applied.Hash != hash) if (applied.Hash != hash && applied.State != State.ARCHIVED)
{ {
Log.outInfo(LogFilter.SqlUpdates, $"Reapplying update \"{availableQuery.GetFileName()}\" \'{applied.Hash.Substring(0, 7)}\' . \'{hash.Substring(0, 7)}\' (it changed)..."); Log.outInfo(LogFilter.SqlUpdates, $"Reapplying update \"{availableQuery.GetFileName()}\" \'{applied.Hash.Substring(0, 7)}\' . \'{hash.Substring(0, 7)}\' (it changed)...");
} }