Skip to content

Commit 8757cd1

Browse files
committed
Clean up unpacked folder
1 parent 635ebad commit 8757cd1

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

Patcher/Patcher/MainWindow.xaml.cs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -453,6 +453,16 @@ private void patcherWorker_DoWork(object sender, DoWorkEventArgs e) //the main f
453453
Popup.Show("ERROR: Could not find decompressed UPK"); //for debugging
454454
}
455455

456+
// -- DELETE UNPACKED FOLDER --
457+
try
458+
{
459+
Directory.Delete(System.IO.Path.Combine(System.IO.Path.GetDirectoryName(System.Reflection.Assembly.GetEntryAssembly().Location), @"unpacked\\"), true); //delete Unpacked folder recursively
460+
}
461+
catch (IOException)
462+
{
463+
//log
464+
}
465+
456466
patcherWorker.ReportProgress(70); //set loadingprogress to 70%
457467
// -- HEX EDITING --
458468
switch (gameID)

0 commit comments

Comments
 (0)