DUH - don't err when asset folder already exists, it should!
This commit is contained in:
parent
5ab96366a6
commit
433bc685dc
|
@ -275,7 +275,7 @@ public class Gonzo {
|
|||
if (!Main.windows) {two = new File(System.getProperty("user.home") + "/.firestar/temp/" + oArcTarget).renameTo(new File(Main.outpath + oArcTarget));}
|
||||
else {two = new File(System.getProperty("user.home") + "\\.firestar\\temp\\" + oArcTarget).renameTo(new File(Main.outpath + oArcTarget));}
|
||||
System.out.println("moved file to destination: " + two);
|
||||
if (one && two) {System.out.println("file should be located at " + Main.outpath + oArcTarget);} else {
|
||||
if (two) {System.out.println("file should be located at " + Main.outpath + oArcTarget);} else {
|
||||
System.out.println("CRITICAL FAILURE: Please check that your output path is correct and that you have write permissions!");
|
||||
consoleDisplay.append("CRITICAL FAILURE: Please check that your output path is correct and that you have write permissions!");
|
||||
JOptionPane.showMessageDialog(this.frame, "CRITICAL FAILURE: Please check that your output path is correct and that you have write permissions!", "Fatal Error", JOptionPane.ERROR_MESSAGE);
|
||||
|
|
|
@ -280,6 +280,22 @@ public class MissPiggy implements ActionListener {
|
|||
|
||||
public void importModGUI() {
|
||||
// todo call system shell to request file picker
|
||||
JFileChooser fileChooser = new JFileChooser();
|
||||
fileChooser.setCurrentDirectory(new File(System.getProperty("user.home")));
|
||||
int result = fileChooser.showOpenDialog(frame);
|
||||
|
||||
if (result == JFileChooser.APPROVE_OPTION) {
|
||||
File selectedFile = fileChooser.getSelectedFile();
|
||||
System.out.println("Importing selected mod file \"" + selectedFile.getName() + "\"");
|
||||
|
||||
ZipFile zipImporterHandler = new ZipFile(selectedFile.getPath());
|
||||
if (zipImporterHandler.isValidZipFile()) {
|
||||
|
||||
} else {
|
||||
System.out.println("ERROR: File is not a valid ZIP archive. Aborting.");
|
||||
JOptionPane.showMessageDialog(frame, "Whoops, that's not a valid ZIP archive.\nMod files should be in .zip, .agr, .agrc or .agrf.", "Error", JOptionPane.ERROR_MESSAGE);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void removeAllGUI() {
|
||||
|
|
Loading…
Reference in New Issue
Block a user