From e27f5a3201eb232063b24f09f76ab83095c85374 Mon Sep 17 00:00:00 2001 From: Liza Carvelli Date: Thu, 16 Feb 2023 10:51:25 +0100 Subject: [PATCH] Export: Version bump --- Pal.Client/Scheduled/QueuedImport.cs | 4 ++++ Pal.Common/ExportConfig.cs | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/Pal.Client/Scheduled/QueuedImport.cs b/Pal.Client/Scheduled/QueuedImport.cs index fe263b1..ce13b30 100644 --- a/Pal.Client/Scheduled/QueuedImport.cs +++ b/Pal.Client/Scheduled/QueuedImport.cs @@ -95,12 +95,15 @@ namespace Pal.Client.Scheduled { if (import.Export.ExportVersion != ExportConfig.ExportVersion) { + PluginLog.Error( + $"Import: Different version in export file, {import.Export.ExportVersion} != {ExportConfig.ExportVersion}"); _chatGui.PalError(Localization.Error_ImportFailed_IncompatibleVersion); return false; } if (!Guid.TryParse(import.Export.ExportId, out Guid exportId) || import.ExportId == Guid.Empty) { + PluginLog.Error("Import: Invalid export id"); _chatGui.PalError(Localization.Error_ImportFailed_InvalidFile); return false; } @@ -110,6 +113,7 @@ namespace Pal.Client.Scheduled if (string.IsNullOrEmpty(import.Export.ServerUrl)) { // If we allow for backups as import/export, this should be removed + PluginLog.Error("Import: No server URL"); _chatGui.PalError(Localization.Error_ImportFailed_InvalidFile); return false; } diff --git a/Pal.Common/ExportConfig.cs b/Pal.Common/ExportConfig.cs index e664ee2..408b6f2 100644 --- a/Pal.Common/ExportConfig.cs +++ b/Pal.Common/ExportConfig.cs @@ -8,6 +8,6 @@ namespace Pal.Common { public static class ExportConfig { - public static int ExportVersion => 1; + public static int ExportVersion => 2; } }