Export: Version bump
This commit is contained in:
parent
3d560fad7f
commit
e27f5a3201
@ -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;
|
||||||
}
|
}
|
||||||
|
@ -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;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user