diff --git a/DATabase/DATabase.cs b/DATabase/DATabase.cs index 4cd0b0ce..f1e3d638 100644 --- a/DATabase/DATabase.cs +++ b/DATabase/DATabase.cs @@ -1303,9 +1303,8 @@ Make a selection: outdir = outdir.Replace("\"", ""); if (outdir != "") { - outdir = Path.GetFullPath(outdir); + outdir = Path.GetFullPath(outdir) + Path.DirectorySeparatorChar; } - Console.WriteLine(outdir); filename = filename.Replace("\"", ""); if (File.Exists(filename)) @@ -1380,7 +1379,7 @@ Make a selection: datdata.Description += ".new"; } - Output.WriteDatfile(datdata, (outdir == "" ? Path.GetDirectoryName(file) : outdir + Path.DirectorySeparatorChar + Path.GetDirectoryName(file).Remove(0, filename.Length)), logger); + Output.WriteDatfile(datdata, (outdir == "" ? Path.GetDirectoryName(file) : outdir + Path.GetDirectoryName(file).Remove(0, filename.Length + 1)), logger); } } else diff --git a/SabreHelper/Output.cs b/SabreHelper/Output.cs index ca134e63..dcdb2695 100644 --- a/SabreHelper/Output.cs +++ b/SabreHelper/Output.cs @@ -256,7 +256,7 @@ namespace SabreTools.Helper } sw.Write(footer); - logger.User("File written!" + Environment.NewLine); + logger.Log("File written!" + Environment.NewLine); sw.Close(); fs.Close(); } diff --git a/SabreHelper/RomManipulation.cs b/SabreHelper/RomManipulation.cs index 1a6b6e91..483b6407 100644 --- a/SabreHelper/RomManipulation.cs +++ b/SabreHelper/RomManipulation.cs @@ -332,7 +332,7 @@ namespace SabreTools.Helper sha1 = (sha1 == "" ? "" : sha1.PadLeft(40, '0')); // If we have a rom and it's missing size AND the hashes match a 0-byte file, fill in the rest of the info - if (subreader.Name == "rom" && (size == 0 || size == -1) && (crc == CRCZero || md5 == MD5Zero || sha1 == SHA1Zero)) + if (subreader.Name == "rom" && (size == 0 || size == -1) && ((crc == CRCZero || crc == "") || md5 == MD5Zero || sha1 == SHA1Zero)) { size = SizeZero; crc = CRCZero;