Hardcode edge cases in `MovieConversionExtensions` to pass test

the argument in every real call is from `IMovie.Filename`, which is never
assigned null, and I don't think it's assigned anything but an absolute path
This commit is contained in:
YoshiRulz 2022-08-17 19:03:15 +10:00
parent 2ecb572892
commit 8d484ac196
No known key found for this signature in database
GPG Key ID: C4DE31C245353FB7
1 changed files with 2 additions and 0 deletions

View File

@ -290,7 +290,9 @@ namespace BizHawk.Client.Common
internal static string ConvertFileNameToTasMovie(string oldFileName)
{
if (oldFileName is null) return null;
var (dir, fileNoExt, _) = oldFileName.SplitPathToDirFileAndExt();
if (dir is null) return string.Empty;
var newFileName = Path.Combine(dir, $"{fileNoExt}.{TasMovie.Extension}");
int fileSuffix = 0;
while (File.Exists(newFileName))