From f14bac96e5b2e64d401e234836fd778269afef23 Mon Sep 17 00:00:00 2001 From: Matt Nadareski Date: Wed, 26 Oct 2016 16:37:20 -0700 Subject: [PATCH] [DatFile] Forgot to write out last split DAT --- SabreTools.Helper/Dats/DatFile.cs | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/SabreTools.Helper/Dats/DatFile.cs b/SabreTools.Helper/Dats/DatFile.cs index fda37dff..f2bb402e 100644 --- a/SabreTools.Helper/Dats/DatFile.cs +++ b/SabreTools.Helper/Dats/DatFile.cs @@ -5327,6 +5327,20 @@ namespace SabreTools.Helper.Dats tempDat.Name = Path.GetDirectoryName(key); } + // Then we write the last DAT out since it would be skipped otherwise + string lastpath = HttpUtility.HtmlDecode(String.IsNullOrEmpty(tempDat.Name) + ? outDir + : Path.Combine(outDir, tempDat.Name)); + + // Now set the new output values + tempDat.FileName = HttpUtility.HtmlDecode(String.IsNullOrEmpty(tempDat.Name) ? FileName : Path.GetFileName(tempDat.Name)); + tempDat.Description += " (" + tempDat.Name.Replace(Path.DirectorySeparatorChar, '-').Replace(Path.AltDirectorySeparatorChar, '-') + ")"; + tempDat.Name = Name + " (" + tempDat.Name.Replace(Path.DirectorySeparatorChar, '-').Replace(Path.AltDirectorySeparatorChar, '-') + ")"; + tempDat.Type = null; + + // Write out the temporary DAT to the proper directory + tempDat.WriteToFile(lastpath, logger); + return true; }