mirror of
https://github.com/kwsch/pk3DS.git
synced 2026-08-22 01:35:04 -05:00
Fix garc unpack exception after unpack
label object was not provided Closes #161
This commit is contained in:
@@ -98,9 +98,12 @@ public static bool garcUnpack(string garcPath, string outPath, bool skipDecompre
|
||||
if (!supress) WinFormsUtil.Alert("Unpack Successful!", fileCount + " files unpacked from the GARC!");
|
||||
}
|
||||
|
||||
if (label == null)
|
||||
return true;
|
||||
if (label.InvokeRequired)
|
||||
label.Invoke((MethodInvoker)delegate { label.Visible = false; });
|
||||
else { label.Visible = false; }
|
||||
else
|
||||
label.Visible = false;
|
||||
return true;
|
||||
}
|
||||
catch (FileNotFoundException)
|
||||
|
||||
@@ -1172,7 +1172,7 @@ private bool getGARC(string infile, string outfolder, bool PB, bool bypassExt =
|
||||
}
|
||||
try
|
||||
{
|
||||
bool success = GarcUtil.garcUnpack(infile, outfolder, bypassExt, PB ? pBar1 : null, null, true, bypassExt);
|
||||
bool success = GarcUtil.garcUnpack(infile, outfolder, bypassExt, PB ? pBar1 : null, L_Status, true, bypassExt);
|
||||
updateStatus(string.Format(success ? "Success!" : "Failed!"), false);
|
||||
threads--;
|
||||
return success;
|
||||
@@ -1186,7 +1186,7 @@ private bool setGARC(string outfile, string infolder, int padBytes, bool PB)
|
||||
|
||||
try
|
||||
{
|
||||
bool success = GarcUtil.garcPackMS(infolder, outfile, Config.GARCVersion, padBytes, PB ? pBar1 : null, null, true);
|
||||
bool success = GarcUtil.garcPackMS(infolder, outfile, Config.GARCVersion, padBytes, PB ? pBar1 : null, L_Status, true);
|
||||
threads--;
|
||||
updateStatus(string.Format(success ? "Success!" : "Failed!"), false);
|
||||
return success;
|
||||
|
||||
Reference in New Issue
Block a user