Dont unload all user data upon failure

pull/9/head
Miepee 4 years ago
parent d3c5e9da58
commit 32a8588975

@ -56,7 +56,7 @@ public partial class ModPacker : Form
miscOptionsPanel.AddRow(macButton, macLabel);
var loadZipsPanel = new DynamicLayout() { Spacing = new Size(5, 5) };
loadZipsPanel.AddRow(originalZipButton, null, originalZipLabel);
loadZipsPanel.AddRow(originalZipButton, originalZipLabel);
var resultPanel = new DynamicLayout() { Spacing = new Size(5, 5) };
resultPanel.AddRow(createButton);
@ -110,7 +110,8 @@ public partial class ModPacker : Form
private CheckBox customSaveCheckBox = new CheckBox() { Text = "Uses custom save directory" };
private Button customSaveButton = new Button() { Text = "Select folder", Enabled = false };
private TextBox customSaveTextBox = new TextBox();
// TODO: remove read only and make it correctly respond to user input
private TextBox customSaveTextBox = new TextBox() { ReadOnly = true};
private CheckBox musicCheckBox = new CheckBox() { Text = "Uses custom music" };
private CheckBox yycCheckBox = new CheckBox() { Text = "Uses the YoYo Compiler" };

@ -227,8 +227,6 @@ public partial class ModPacker : Form
createLabel.Text = "Packaging mod(s)... This could take a while!";
string output;
bool successful;
string errorCode;
if (windowsCheckBox.Checked.Value)
{
@ -399,17 +397,6 @@ public partial class ModPacker : Form
private void AbortPatch()
{
// Unload files
isOriginalLoaded = false;
isWindowsLoaded = false;
isApkLoaded = false;
isLinuxLoaded = false;
originalPath = "";
windowsPath = "";
apkPath = "";
linuxPath = "";
saveFilePath = null;
// Set labels
createLabel.Text = "Mod packaging aborted!";
originalZipLabel.Visible = false;

@ -254,7 +254,7 @@ public static class Core
const string d3dHash = "86e39e9161c3d930d93822f1563c280d";
const string dataWinHash = "f2b84fe5ba64cb64e284be1066ca08ee";
const string am2rHash = "15253f7a66d6ea3feef004ebbee9b438";
string tmpPath = Path.GetTempPath() + Path.GetFileNameWithoutExtension(zipPath);
string tmpPath = Path.GetTempPath() + "/" + Path.GetFileNameWithoutExtension(zipPath);
// Clean up in case folder exists already
if (Directory.Exists(tmpPath))

Loading…
Cancel
Save