aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStoica Tedy <stoicatedy@gmail.com>2021-12-14 09:31:35 +0200
committerStoica Tedy <stoicatedy@gmail.com>2021-12-14 09:31:35 +0200
commit250332104b18bafee415ab1a69b2b355f9c18f6b (patch)
treebdaab681b92a3495bd8d55fa0f40cf7d8008eb81
parent0872ede57be79e5e2e5e0cc587e67467072a1081 (diff)
Fixed crash in MigrationRunner
The crashed was caused by importing the migrationOptions even if the migrations.xml file is non existant. [Issue]: ~/.config/jellyfin/migrations.xml not found #6992
-rw-r--r--Jellyfin.Server/Migrations/MigrationRunner.cs4
1 files changed, 4 insertions, 0 deletions
diff --git a/Jellyfin.Server/Migrations/MigrationRunner.cs b/Jellyfin.Server/Migrations/MigrationRunner.cs
index a6886c64a..825cf7338 100644
--- a/Jellyfin.Server/Migrations/MigrationRunner.cs
+++ b/Jellyfin.Server/Migrations/MigrationRunner.cs
@@ -75,6 +75,10 @@ namespace Jellyfin.Server.Migrations
var xmlSerializer = new MyXmlSerializer();
var migrationConfigPath = Path.Join(appPaths.ConfigurationDirectoryPath, MigrationsListStore.StoreKey.ToLowerInvariant() + ".xml");
+ if (!File.Exists(migrationConfigPath))
+ {
+ return;
+ }
var migrationOptions = (MigrationOptions)xmlSerializer.DeserializeFromFile(typeof(MigrationOptions), migrationConfigPath)!;
// We have to deserialize it manually since the configuration manager may overwrite it