Rename property

This commit is contained in:
Dan Balasescu 2022-01-19 11:56:44 +09:00
parent 195534a1d2
commit c52899b1fb
1 changed files with 3 additions and 3 deletions

View File

@ -361,13 +361,13 @@ void convertOnlineIDs<T>() where T : RealmObject
private string? getRulesetShortNameFromLegacyID(long rulesetId) => private string? getRulesetShortNameFromLegacyID(long rulesetId) =>
efContextFactory?.Get().RulesetInfo.FirstOrDefault(r => r.ID == rulesetId)?.ShortName; efContextFactory?.Get().RulesetInfo.FirstOrDefault(r => r.ID == rulesetId)?.ShortName;
public void CreateBackup(string filename) public void CreateBackup(string backupFilename)
{ {
using (BlockAllOperations()) using (BlockAllOperations())
{ {
Logger.Log($"Creating full realm database backup at {filename}", LoggingTarget.Database); Logger.Log($"Creating full realm database backup at {backupFilename}", LoggingTarget.Database);
using (var source = storage.GetStream(Filename)) using (var source = storage.GetStream(Filename))
using (var destination = storage.GetStream(filename, FileAccess.Write, FileMode.CreateNew)) using (var destination = storage.GetStream(backupFilename, FileAccess.Write, FileMode.CreateNew))
source.CopyTo(destination); source.CopyTo(destination);
} }
} }