From f78523169299fbd519b74bb0496598817371739b Mon Sep 17 00:00:00 2001 From: Kurt Date: Sat, 2 Jan 2021 10:34:33 -0800 Subject: [PATCH] Fix backup filenaming --- PKHeX.Core/Saves/SaveFileMetadata.cs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/PKHeX.Core/Saves/SaveFileMetadata.cs b/PKHeX.Core/Saves/SaveFileMetadata.cs index f2d8f8307..c73f56fc5 100644 --- a/PKHeX.Core/Saves/SaveFileMetadata.cs +++ b/PKHeX.Core/Saves/SaveFileMetadata.cs @@ -30,10 +30,12 @@ namespace PKHeX.Core private byte[] Footer = Array.Empty(); // .dsv private byte[] Header = Array.Empty(); // .gci + private string BAKSuffix => $" [{SAV.ShortSummary}].bak"; + /// /// Simple summary of the save file, to help differentiate it from other save files with the same filename. /// - public string BAKName => $"{FileName} [{SAV.ShortSummary}].bak"; + public string BAKName => FileName + BAKSuffix; public SaveFileMetadata(SaveFile sav) => SAV = sav; @@ -89,7 +91,7 @@ namespace PKHeX.Core { FilePath = path; FileFolder = Path.GetDirectoryName(path); - FileName = GetFileName(path, BAKName); + FileName = GetFileName(path, BAKSuffix); } private static string? GetFileName(string path, string bak)