diff --git a/PKHeX/MysteryGifts/MysteryGift.cs b/PKHeX/MysteryGifts/MysteryGift.cs index 0f8b48052..ee6868561 100644 --- a/PKHeX/MysteryGifts/MysteryGift.cs +++ b/PKHeX/MysteryGifts/MysteryGift.cs @@ -80,7 +80,7 @@ namespace PKHeX } } - public string Extension => "." + GetType().Name.ToLower(); + public string Extension => GetType().Name.ToLower(); public string FileName => getCardHeader() + "." + Extension; public virtual byte[] Data { get; set; } public abstract PKM convertToPKM(SaveFile SAV); diff --git a/PKHeX/Resources/byte/wc6.pkl b/PKHeX/Resources/byte/wc6.pkl index 9dd487771..de55b2b7b 100644 Binary files a/PKHeX/Resources/byte/wc6.pkl and b/PKHeX/Resources/byte/wc6.pkl differ diff --git a/PKHeX/Resources/byte/wc6full.pkl b/PKHeX/Resources/byte/wc6full.pkl index 441c76b34..3b1769957 100644 Binary files a/PKHeX/Resources/byte/wc6full.pkl and b/PKHeX/Resources/byte/wc6full.pkl differ diff --git a/PKHeX/Subforms/Save Editors/SAV_Wondercard.cs b/PKHeX/Subforms/Save Editors/SAV_Wondercard.cs index 2638005fe..697e3da11 100644 --- a/PKHeX/Subforms/Save Editors/SAV_Wondercard.cs +++ b/PKHeX/Subforms/Save Editors/SAV_Wondercard.cs @@ -147,14 +147,22 @@ namespace PKHeX SaveFileDialog outputwc6 = new SaveFileDialog { Filter = getFilter(), - FileName = Util.CleanFileName($"{mg.CardID} - {mg.CardTitle}{mg.Extension}") + FileName = Util.CleanFileName(mg.FileName) }; if (outputwc6.ShowDialog() != DialogResult.OK) return; string path = outputwc6.FileName; - if (File.Exists(path)) // File already exists, save a .bak - File.WriteAllBytes(path + ".bak", File.ReadAllBytes(path)); + if (File.Exists(path)) + { + // File already exists, save a .bak + string bakpath = path + ".bak"; + if (!File.Exists(bakpath)) + { + byte[] backupfile = File.ReadAllBytes(path); + File.WriteAllBytes(bakpath, backupfile); + } + } File.WriteAllBytes(path, mg.Data); }