Base path not being set correctly all the time

This commit is contained in:
Matt Nadareski
2016-05-20 23:28:47 -07:00
parent 8790e2ef94
commit 30752d8c0e

View File

@@ -137,6 +137,9 @@ namespace SabreTools
private bool SplitHelper(string filename, string basepath)
{
// Sanitize the basepath to be more predictable
basepath = (basepath.EndsWith(Path.DirectorySeparatorChar.ToString()) ? basepath : basepath + Path.DirectorySeparatorChar);
// Get the file data to be split
OutputFormat outputFormat = RomManipulation.GetOutputFormat(filename);
DatData datdata = new DatData
@@ -267,7 +270,7 @@ namespace SabreTools
string outdir = "";
if (_outdir != "")
{
outdir = _outdir + Path.GetDirectoryName(filename).Remove(0, basepath.Length);
outdir = _outdir + Path.GetDirectoryName(filename).Remove(0, basepath.Length - 1);
}
else
{