TAStudio: use path.combine now, as well as fix a usage of '\' for filename display in .bk2
This commit is contained in:
parent
e215f99f74
commit
34f99922cd
|
@ -304,7 +304,9 @@ namespace BizHawk.Client.Common
|
|||
int fileSuffix = 0;
|
||||
while (File.Exists(newFileName))
|
||||
{
|
||||
newFileName = $"{Path.GetDirectoryName(oldFileName)}/{Path.GetFileNameWithoutExtension(oldFileName)} {++fileSuffix}.{TasMovie.Extension}";
|
||||
// Using this should hopefully be system agnostic
|
||||
var temp_path = Path.Combine(Path.GetDirectoryName(oldFileName), Path.GetFileNameWithoutExtension(oldFileName));
|
||||
newFileName = $"{temp_path} {++fileSuffix}.{TasMovie.Extension}";
|
||||
}
|
||||
|
||||
return newFileName;
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using BizHawk.Emulation.Common;
|
||||
using BizHawk.Emulation.Cores;
|
||||
|
||||
|
@ -48,8 +49,7 @@ namespace BizHawk.Client.Common
|
|||
set
|
||||
{
|
||||
_filename = value;
|
||||
int index = Filename.LastIndexOf("\\");
|
||||
Name = Filename.Substring(index + 1, Filename.Length - index - 1);
|
||||
Name = Path.GetFileName(Filename);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue