From bf3630bc040a1b7f64bd6782d5b7996509eae716 Mon Sep 17 00:00:00 2001 From: Matt Nadareski Date: Wed, 25 May 2016 10:23:42 -0700 Subject: [PATCH] Always keep track of the last parent, always --- DATFromDir/DATFromDir.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/DATFromDir/DATFromDir.cs b/DATFromDir/DATFromDir.cs index b8fcb878..ee11ced7 100644 --- a/DATFromDir/DATFromDir.cs +++ b/DATFromDir/DATFromDir.cs @@ -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