Fix `GameInfo.NullInstance` having a name... why did it have a name

This commit is contained in:
YoshiRulz 2022-07-25 11:15:19 +10:00
parent d796210437
commit 8dcea24703
No known key found for this signature in database
GPG Key ID: C4DE31C245353FB7
2 changed files with 2 additions and 2 deletions

View File

@ -48,7 +48,7 @@ namespace BizHawk.Emulation.Common
public static GameInfo NullInstance => new GameInfo
{
Name = "Null",
Name = string.Empty,
System = VSystemID.Raw.NULL,
Hash = "",
Region = "",

View File

@ -429,7 +429,7 @@ namespace BizHawk.Emulation.Common
.Replace('|', '+') // '|' is the filename-member separator for archives in HawkFile
.Replace(":", " -") // ':' is the path separator in lists (Path.GetFileName will drop all but the last entry in such a list)
.Replace("\"", ""); // '"' is just annoying as it needs escaping on the command-line
var filesystemDir = Path.GetDirectoryName(pass1);
var filesystemDir = string.IsNullOrWhiteSpace(pass1) ? string.Empty : Path.GetDirectoryName(pass1);
var pass2 = Path.GetFileName(pass1).RemoveInvalidFileSystemChars();
return Path.Combine(filesystemDir, pass2.RemoveSuffix('.')); // trailing '.' would be duplicated when file extension is added
}