mirror of
https://github.com/claunia/SabreTools.git
synced 2025-12-16 19:14:27 +00:00
Slight tweak to accommodate RV Dir2DAT
This commit is contained in:
@@ -114,9 +114,13 @@ namespace SabreTools.Helper
|
|||||||
while (xtr.NodeType != XmlNodeType.None)
|
while (xtr.NodeType != XmlNodeType.None)
|
||||||
{
|
{
|
||||||
// If we have an end folder element, remove one item from the parent, if possible
|
// If we have an end folder element, remove one item from the parent, if possible
|
||||||
if (xtr.NodeType == XmlNodeType.EndElement && xtr.Name == "directory" && parent.Count > 0)
|
if (xtr.NodeType == XmlNodeType.EndElement && (xtr.Name == "directory" || xtr.Name == "dir") && parent.Count > 0)
|
||||||
{
|
{
|
||||||
parent.RemoveAt(parent.Count - 1);
|
parent.RemoveAt(parent.Count - 1);
|
||||||
|
if (keep)
|
||||||
|
{
|
||||||
|
datdata.Type = (String.IsNullOrEmpty(datdata.Type) ? "SuperDAT" : datdata.Type);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// We only want elements
|
// We only want elements
|
||||||
@@ -371,6 +375,12 @@ namespace SabreTools.Helper
|
|||||||
{
|
{
|
||||||
tempname = Regex.Match(tempname, @".*?\\(.*)").Groups[1].Value;
|
tempname = Regex.Match(tempname, @".*?\\(.*)").Groups[1].Value;
|
||||||
}
|
}
|
||||||
|
// Get the name of the game from the parent
|
||||||
|
else if (superdat && keep && parent.Count > 0)
|
||||||
|
{
|
||||||
|
|
||||||
|
tempname = String.Join("\\", parent) + "\\" + tempname;
|
||||||
|
}
|
||||||
|
|
||||||
while (subreader.Read())
|
while (subreader.Read())
|
||||||
{
|
{
|
||||||
@@ -494,6 +504,7 @@ namespace SabreTools.Helper
|
|||||||
shouldbreak = true;
|
shouldbreak = true;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
case "dir":
|
||||||
case "directory":
|
case "directory":
|
||||||
// Set SuperDAT flag for all SabreDAT inputs, regardless of depth
|
// Set SuperDAT flag for all SabreDAT inputs, regardless of depth
|
||||||
superdat = true;
|
superdat = true;
|
||||||
|
|||||||
Reference in New Issue
Block a user