Always keep track of the last parent, always

This commit is contained in:
Matt Nadareski
2016-05-25 10:23:42 -07:00
parent 3f80755a3b
commit bf3630bc04

View File

@@ -254,7 +254,7 @@ namespace SabreTools
// This is where the main loop would go
if (File.Exists(_basePath))
{
lastparent = ProcessFile(_basePath, sw);
lastparent = ProcessFile(_basePath, sw, lastparent);
}
else if (Directory.Exists(_basePath))
{
@@ -280,7 +280,7 @@ namespace SabreTools
foreach (string subitem in Directory.EnumerateFiles(item, "*", SearchOption.AllDirectories))
{
items = true;
lastparent = ProcessFile(subitem, sw, item);
lastparent = ProcessFile(subitem, sw, lastparent);
}
// If there were no subitems, add a "blank" game to to the set