diff options
| author | Stoica Tedy <stoicatedy@gmail.com> | 2021-12-14 09:31:35 +0200 |
|---|---|---|
| committer | Stoica Tedy <stoicatedy@gmail.com> | 2021-12-14 09:31:35 +0200 |
| commit | 250332104b18bafee415ab1a69b2b355f9c18f6b (patch) | |
| tree | bdaab681b92a3495bd8d55fa0f40cf7d8008eb81 /Jellyfin.Server | |
| parent | 0872ede57be79e5e2e5e0cc587e67467072a1081 (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
Diffstat (limited to 'Jellyfin.Server')
| -rw-r--r-- | Jellyfin.Server/Migrations/MigrationRunner.cs | 4 |
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 |
