* make sure java.io.tmpdir exists, ImageIO crashes the filebot startup sequence if it doesn't
This commit is contained in:
parent
d56f19f9c3
commit
03c31459a4
@ -17,6 +17,7 @@ import java.awt.event.WindowEvent;
|
|||||||
import java.io.File;
|
import java.io.File;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.io.RandomAccessFile;
|
import java.io.RandomAccessFile;
|
||||||
|
import java.lang.reflect.InvocationTargetException;
|
||||||
import java.net.URI;
|
import java.net.URI;
|
||||||
import java.nio.ByteBuffer;
|
import java.nio.ByteBuffer;
|
||||||
import java.nio.channels.FileLock;
|
import java.nio.channels.FileLock;
|
||||||
@ -71,6 +72,10 @@ public class Main {
|
|||||||
initializeCache();
|
initializeCache();
|
||||||
initializeSecurityManager();
|
initializeSecurityManager();
|
||||||
|
|
||||||
|
// make sure tmpdir exists
|
||||||
|
File tmpdir = new File(System.getProperty("java.io.tmpdir"));
|
||||||
|
tmpdir.mkdirs();
|
||||||
|
|
||||||
try {
|
try {
|
||||||
// parse arguments
|
// parse arguments
|
||||||
final ArgumentProcessor cli = new ArgumentProcessor();
|
final ArgumentProcessor cli = new ArgumentProcessor();
|
||||||
@ -134,9 +139,11 @@ public class Main {
|
|||||||
startUserInterface(args);
|
startUserInterface(args);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
} catch (Exception e) {
|
} catch (InvocationTargetException e) {
|
||||||
Logger.getLogger(Main.class.getName()).log(Level.SEVERE, e.getMessage(), e);
|
Logger.getLogger(Main.class.getName()).log(Level.SEVERE, e.getCause().getMessage(), e.getCause());
|
||||||
System.exit(-1); // starting up UI failed
|
System.exit(-1); // starting up UI failed
|
||||||
|
} catch (InterruptedException e) {
|
||||||
|
throw new RuntimeException(e); // won't happen
|
||||||
}
|
}
|
||||||
|
|
||||||
// pre-load media.types (when loaded during DnD it will freeze the UI for a few hundred milliseconds)
|
// pre-load media.types (when loaded during DnD it will freeze the UI for a few hundred milliseconds)
|
||||||
|
Loading…
Reference in New Issue
Block a user