Export: Version bump

This commit is contained in:
Liza 2023-02-16 10:51:25 +01:00
parent 3d560fad7f
commit e27f5a3201
2 changed files with 5 additions and 1 deletions

View File

@ -95,12 +95,15 @@ namespace Pal.Client.Scheduled
{ {
if (import.Export.ExportVersion != ExportConfig.ExportVersion) 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); _chatGui.PalError(Localization.Error_ImportFailed_IncompatibleVersion);
return false; return false;
} }
if (!Guid.TryParse(import.Export.ExportId, out Guid exportId) || import.ExportId == Guid.Empty) 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); _chatGui.PalError(Localization.Error_ImportFailed_InvalidFile);
return false; return false;
} }
@ -110,6 +113,7 @@ namespace Pal.Client.Scheduled
if (string.IsNullOrEmpty(import.Export.ServerUrl)) if (string.IsNullOrEmpty(import.Export.ServerUrl))
{ {
// If we allow for backups as import/export, this should be removed // If we allow for backups as import/export, this should be removed
PluginLog.Error("Import: No server URL");
_chatGui.PalError(Localization.Error_ImportFailed_InvalidFile); _chatGui.PalError(Localization.Error_ImportFailed_InvalidFile);
return false; return false;
} }

View File

@ -8,6 +8,6 @@ namespace Pal.Common
{ {
public static class ExportConfig public static class ExportConfig
{ {
public static int ExportVersion => 1; public static int ExportVersion => 2;
} }
} }