From 8f893466810ca841b55a028cb606f971bd6232fa Mon Sep 17 00:00:00 2001 From: Kurt Date: Thu, 23 Jan 2020 08:35:12 -0800 Subject: [PATCH] Sanitize filename before try write Closes #2656 ty @xJam-es ! --- PKHeX.WinForms/Subforms/Save Editors/Gen7/SAV_Trainer7GG.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/PKHeX.WinForms/Subforms/Save Editors/Gen7/SAV_Trainer7GG.cs b/PKHeX.WinForms/Subforms/Save Editors/Gen7/SAV_Trainer7GG.cs index dbf9d2f06..1dcb405bf 100644 --- a/PKHeX.WinForms/Subforms/Save Editors/Gen7/SAV_Trainer7GG.cs +++ b/PKHeX.WinForms/Subforms/Save Editors/Gen7/SAV_Trainer7GG.cs @@ -158,7 +158,7 @@ namespace PKHeX.WinForms var folder = fbd.SelectedPath; foreach (var gpk in gofiles) - File.WriteAllBytes(Path.Combine(folder, gpk.FileName), gpk.Data); + File.WriteAllBytes(Path.Combine(folder, Util.CleanFileName(gpk.FileName)), gpk.Data); WinFormsUtil.Alert($"Dumped {gofiles.Length} files to {folder}"); }