Ensure reading of existing databases when making backups doesn't create a file

This commit is contained in:
Dean Herbert
2022-06-16 16:48:06 +09:00
parent 1c3cc985bc
commit 739a696467
2 changed files with 2 additions and 2 deletions

View File

@ -151,7 +151,7 @@ namespace osu.Game.Database
{
Logger.Log($"Creating full EF database backup at {backupFilename}", LoggingTarget.Database);
using (var source = storage.GetStream(DATABASE_NAME))
using (var source = storage.GetStream(DATABASE_NAME, mode: FileMode.Open))
using (var destination = storage.GetStream(backupFilename, FileAccess.Write, FileMode.CreateNew))
source.CopyTo(destination);
}