From 9a636d181d76608f1806b4605cd518fe17e56d16 Mon Sep 17 00:00:00 2001 From: NintenHero <37460517+MichaelHinrichs@users.noreply.github.com> Date: Sun, 17 Mar 2024 14:58:00 -0500 Subject: [PATCH] Wait to create the extraction folder until it's needed --- Program.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Program.cs b/Program.cs index 56b856f..a665fad 100644 --- a/Program.cs +++ b/Program.cs @@ -3,7 +3,6 @@ using System.IO.Compression; FileStream input = File.OpenRead(args[0]); BinaryReader br = new(input); -Directory.CreateDirectory(Path.GetDirectoryName(args[0]) + "\\" + Path.GetFileNameWithoutExtension(args[0])); if (new string(br.ReadChars(7)) != "D-PACK2") throw new Exception("Not a ASURA dat file."); @@ -24,6 +23,7 @@ for (int i = 0; i < fileCount; i++) }); } +Directory.CreateDirectory(Path.GetDirectoryName(args[0]) + "\\" + Path.GetFileNameWithoutExtension(args[0])); foreach (SUBFILE subfile in subfiles) { br.BaseStream.Position = subfile.start; @@ -50,4 +50,4 @@ class SUBFILE public int sizeUncompressed; public int sizeCompressed; public int name; -} \ No newline at end of file +}