mirror of
https://github.com/osukey/osukey.git
synced 2025-07-03 01:09:57 +09:00
Move null to finally
This commit is contained in:
@ -132,11 +132,16 @@ namespace osu.Game.Database
|
||||
|
||||
Task.Factory.StartNew(() =>
|
||||
{
|
||||
realm.CreateBackup(Path.Combine(backup_folder, $"client.{backupSuffix}.realm"), realmBlockOperations);
|
||||
|
||||
// Above call will dispose of the blocking token when done.
|
||||
// Clean up here so we don't accidentally dispose twice.
|
||||
realmBlockOperations = null;
|
||||
try
|
||||
{
|
||||
realm.CreateBackup(Path.Combine(backup_folder, $"client.{backupSuffix}.realm"), realmBlockOperations);
|
||||
}
|
||||
finally
|
||||
{
|
||||
// Above call will dispose of the blocking token when done.
|
||||
// Clean up here so we don't accidentally dispose twice.
|
||||
realmBlockOperations = null;
|
||||
}
|
||||
|
||||
efContextFactory.CreateBackup(Path.Combine(backup_folder, $"client.{backupSuffix}.db"));
|
||||
|
||||
|
Reference in New Issue
Block a user