mirror of
https://github.com/claunia/SabreTools.git
synced 2025-12-16 19:14:27 +00:00
Enable SabreDAT read-in and fix output
Additionally, fix the necessity for blank strings in DatData definitions for read-in. Now if it's null it'll try writing to it as well.
This commit is contained in:
@@ -192,7 +192,7 @@ namespace SabreTools.Helper
|
||||
{
|
||||
state += "\t";
|
||||
}
|
||||
state += "</folder>\n";
|
||||
state += "</directory>\n";
|
||||
}
|
||||
|
||||
// Reset the current depth
|
||||
@@ -221,7 +221,7 @@ namespace SabreTools.Helper
|
||||
{
|
||||
state += "\t";
|
||||
}
|
||||
state += "<folder name=\"" + HttpUtility.HtmlEncode(newsplit[i]) + "\" description=\"" +
|
||||
state += "<directory name=\"" + HttpUtility.HtmlEncode(newsplit[i]) + "\" description=\"" +
|
||||
HttpUtility.HtmlEncode(newsplit[i]) + "\">\n";
|
||||
}
|
||||
depth = depth - (last == -1 ? 0 : last) + newsplit.Count;
|
||||
@@ -336,14 +336,14 @@ namespace SabreTools.Helper
|
||||
footer = ")";
|
||||
break;
|
||||
case OutputFormat.SabreDat:
|
||||
for (int i = depth; i >= 2; i--)
|
||||
for (int i = depth - 1; i >= 2; i--)
|
||||
{
|
||||
// Print out the number of tabs and the end folder
|
||||
for (int j = 0; j < i; j++)
|
||||
{
|
||||
footer += "\t";
|
||||
}
|
||||
footer += "</folder>\n";
|
||||
footer += "</directory>\n";
|
||||
}
|
||||
footer += "\t</data>\n</datafile>";
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user