mirror of
https://github.com/claunia/SabreTools.git
synced 2025-12-16 19:14:27 +00:00
[ArchiveTools, DatFile] Ensure output filenames are legal
This commit is contained in:
@@ -4494,7 +4494,7 @@ namespace SabreTools.Helper.Dats
|
||||
{
|
||||
string infile = pathsToFiles[i];
|
||||
Rom outrom = romsInGame[i];
|
||||
string outfile = Path.Combine(outDir, outrom.Machine.Name, outrom.Name);
|
||||
string outfile = Path.Combine(outDir, Style.RemovePathUnsafeCharacters(outrom.Machine.Name), outrom.Name);
|
||||
|
||||
// Make sure the output folder is created
|
||||
Directory.CreateDirectory(Path.GetDirectoryName(outfile));
|
||||
@@ -4517,6 +4517,7 @@ namespace SabreTools.Helper.Dats
|
||||
{
|
||||
string infile = pathsToFiles[i];
|
||||
Rom outrom = romsInGame[i];
|
||||
outrom.Machine.Name = Style.RemovePathUnsafeCharacters(outrom.Machine.Name);
|
||||
ArchiveTools.WriteTorrentGZ(infile, outDir, romba, logger);
|
||||
}
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user