Merge pull request #6994 from Tedyst/master
Fixed crash in MigrationRunner by checking migration for file existance
This commit is contained in:
commit
38f0e611c8
|
@ -75,7 +75,9 @@ namespace Jellyfin.Server.Migrations
|
|||
|
||||
var xmlSerializer = new MyXmlSerializer();
|
||||
var migrationConfigPath = Path.Join(appPaths.ConfigurationDirectoryPath, MigrationsListStore.StoreKey.ToLowerInvariant() + ".xml");
|
||||
var migrationOptions = (MigrationOptions)xmlSerializer.DeserializeFromFile(typeof(MigrationOptions), migrationConfigPath)!;
|
||||
var migrationOptions = File.Exists(migrationConfigPath)
|
||||
? (MigrationOptions)xmlSerializer.DeserializeFromFile(typeof(MigrationOptions), migrationConfigPath)!
|
||||
: new MigrationOptions();
|
||||
|
||||
// We have to deserialize it manually since the configuration manager may overwrite it
|
||||
var serverConfig = (ServerConfiguration)xmlSerializer.DeserializeFromFile(typeof(ServerConfiguration), appPaths.SystemConfigurationFilePath)!;
|
||||
|
|
Loading…
Reference in New Issue
Block a user