mirror of
https://github.com/claunia/SabreTools.git
synced 2025-12-16 19:14:27 +00:00
Extensions are confusing
This commit is contained in:
@@ -68,9 +68,9 @@ namespace DatSplit
|
|||||||
|
|
||||||
// Then write out both files
|
// Then write out both files
|
||||||
Output.WriteToDat(Path.GetFileNameWithoutExtension(_filename) + "." + _extA, Path.GetFileNameWithoutExtension(_filename) + "." + _extA,
|
Output.WriteToDat(Path.GetFileNameWithoutExtension(_filename) + "." + _extA, Path.GetFileNameWithoutExtension(_filename) + "." + _extA,
|
||||||
"", "", "", "", false, Path.GetExtension(_filename) == ".dat", "", romsA, logger);
|
"", "", "", "", false, !RomManipulation.IsXmlDat(_filename), "", romsA, logger);
|
||||||
Output.WriteToDat(Path.GetFileNameWithoutExtension(_filename) + "." + _extB, Path.GetFileNameWithoutExtension(_filename) + "." + _extB,
|
Output.WriteToDat(Path.GetFileNameWithoutExtension(_filename) + "." + _extB, Path.GetFileNameWithoutExtension(_filename) + "." + _extB,
|
||||||
"", "", "", "", false, Path.GetExtension(_filename) == ".dat", "", romsB, logger);
|
"", "", "", "", false, !RomManipulation.IsXmlDat(_filename), "", romsB, logger);
|
||||||
|
|
||||||
logger.Close();
|
logger.Close();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -292,5 +292,19 @@ namespace SabreTools.Helper
|
|||||||
return (norename ? String.Compare(x.Game, y.Game) : x.SystemID - y.SystemID);
|
return (norename ? String.Compare(x.Game, y.Game) : x.SystemID - y.SystemID);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static bool IsXmlDat(string filename)
|
||||||
|
{
|
||||||
|
XmlDocument doc = new XmlDocument();
|
||||||
|
try
|
||||||
|
{
|
||||||
|
doc.LoadXml(File.ReadAllText(filename));
|
||||||
|
}
|
||||||
|
catch (XmlException)
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -133,7 +133,7 @@ namespace SabreTools
|
|||||||
|
|
||||||
// Now write the file out accordingly
|
// Now write the file out accordingly
|
||||||
Output.WriteToDat(Path.GetFileNameWithoutExtension(filename),
|
Output.WriteToDat(Path.GetFileNameWithoutExtension(filename),
|
||||||
Path.GetFileNameWithoutExtension(filename), "", "", "", "", _forceunpack, Path.GetExtension(filename) == ".dat", Path.GetDirectoryName(filename), outroms, logger);
|
Path.GetFileNameWithoutExtension(filename), "", "", "", "", _forceunpack, !RomManipulation.IsXmlDat(filename), Path.GetDirectoryName(filename), outroms, logger);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user