Filter out forward slashes in FileSystemSafeName to fix games such as "Super Mario Bros. / Duck Hunt". Fixes #1088

This commit is contained in:
Dan B (Narry) 2018-05-06 16:10:08 -04:00 committed by nattthebear
parent c9898c452a
commit 43f2435737
1 changed files with 2 additions and 1 deletions

View File

@ -231,7 +231,8 @@ namespace BizHawk.Client.Common
var filesystemSafeName = game.Name
.Replace("|", "+")
.Replace(":", " -") // adelikat - Path.GetFileName scraps everything to the left of a colon unfortunately, so we need this hack here
.Replace("\"", ""); // adelikat - Ivan Ironman Stewart's Super Off-Road has quotes in game name
.Replace("\"", "") // adelikat - Ivan Ironman Stewart's Super Off-Road has quotes in game name
.Replace("/", "+"); // Narry - Mario Bros / Duck hunt has a slash in the name which GetDirectoryName and GetFileName treat as if it were a folder
// zero 06-nov-2015 - regarding the below, i changed my mind. for libretro i want subdirectories here.
var filesystemDir = Path.GetDirectoryName(filesystemSafeName);