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
This commit is contained in:
parent
0872ede57b
commit
250332104b
|
@ -75,6 +75,10 @@ namespace Jellyfin.Server.Migrations
|
||||||
|
|
||||||
var xmlSerializer = new MyXmlSerializer();
|
var xmlSerializer = new MyXmlSerializer();
|
||||||
var migrationConfigPath = Path.Join(appPaths.ConfigurationDirectoryPath, MigrationsListStore.StoreKey.ToLowerInvariant() + ".xml");
|
var migrationConfigPath = Path.Join(appPaths.ConfigurationDirectoryPath, MigrationsListStore.StoreKey.ToLowerInvariant() + ".xml");
|
||||||
|
if (!File.Exists(migrationConfigPath))
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
var migrationOptions = (MigrationOptions)xmlSerializer.DeserializeFromFile(typeof(MigrationOptions), migrationConfigPath)!;
|
var migrationOptions = (MigrationOptions)xmlSerializer.DeserializeFromFile(typeof(MigrationOptions), migrationConfigPath)!;
|
||||||
|
|
||||||
// We have to deserialize it manually since the configuration manager may overwrite it
|
// We have to deserialize it manually since the configuration manager may overwrite it
|
||||||
|
|
Loading…
Reference in New Issue
Block a user