From 292007b06dbc1380e162078df4b433cf6b186484 Mon Sep 17 00:00:00 2001 From: Matt Nadareski Date: Wed, 20 Apr 2016 12:09:51 -0700 Subject: [PATCH] Directories don't work the same in Mono --- DatToMiss/DatToMiss.cs | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/DatToMiss/DatToMiss.cs b/DatToMiss/DatToMiss.cs index 200f7d4e..ea7f928e 100644 --- a/DatToMiss/DatToMiss.cs +++ b/DatToMiss/DatToMiss.cs @@ -80,11 +80,16 @@ namespace SabreTools return; } - // Make sure that the path provided is real + // Get the output name + string name = Path.GetDirectoryName(input); + if (!name.EndsWith(Path.DirectorySeparatorChar.ToString())) + { + name += Path.DirectorySeparatorChar; + } + name += Path.GetFileNameWithoutExtension(input) + "-miss.txt"; // Read in the roms from the DAT and then write them to the file - Output.WriteToText(Path.GetDirectoryName(input) + Path.DirectorySeparatorChar + Path.GetFileNameWithoutExtension(input) + "-miss.txt", - Path.GetDirectoryName(input), RomManipulation.Parse(input, 0, 0, logger), logger, usegame, prefix, postfix); + Output.WriteToText(name, Path.GetDirectoryName(input), RomManipulation.Parse(input, 0, 0, logger), logger, usegame, prefix, postfix); } } }