mirror of
https://github.com/lax1dude/eagler-binary-tools.git
synced 2024-12-21 23:04:17 -08:00
Fix a NullPointerException when people specify a path in the same directory without a parent. (#6)
* Update OptimizedOBJConverter.java * Update OBJConverter.java
This commit is contained in:
parent
9e0f5a5f3d
commit
d9fcea6190
|
@ -50,6 +50,7 @@ public class OBJConverter {
|
||||||
System.out.println("Exporting " + (v1_8 ? "1.8" : "1.5") + " MDL: " + output.getAbsolutePath());
|
System.out.println("Exporting " + (v1_8 ? "1.8" : "1.5") + " MDL: " + output.getAbsolutePath());
|
||||||
boolean tex = args[2].equalsIgnoreCase("true") || args[2].equals("1");
|
boolean tex = args[2].equalsIgnoreCase("true") || args[2].equals("1");
|
||||||
if (!output.exists()) {
|
if (!output.exists()) {
|
||||||
|
if (output.getParentFile() != null)
|
||||||
if (!output.getParentFile().exists())
|
if (!output.getParentFile().exists())
|
||||||
if (!output.getParentFile().mkdirs())
|
if (!output.getParentFile().mkdirs())
|
||||||
throw new RuntimeException("Failed to create parent dir!");
|
throw new RuntimeException("Failed to create parent dir!");
|
||||||
|
|
|
@ -25,6 +25,7 @@ public class OptimizedOBJConverter {
|
||||||
System.out.println("Exporting " + (v1_8 ? "1.8" : "1.5") + " MDL: " + output.getAbsolutePath());
|
System.out.println("Exporting " + (v1_8 ? "1.8" : "1.5") + " MDL: " + output.getAbsolutePath());
|
||||||
boolean tex = args[2].equalsIgnoreCase("true") || args[2].equals("1");
|
boolean tex = args[2].equalsIgnoreCase("true") || args[2].equals("1");
|
||||||
if (!output.exists()) {
|
if (!output.exists()) {
|
||||||
|
if (output.getParentFile() != null)
|
||||||
if (!output.getParentFile().exists())
|
if (!output.getParentFile().exists())
|
||||||
if (!output.getParentFile().mkdirs())
|
if (!output.getParentFile().mkdirs())
|
||||||
throw new RuntimeException("Failed to create parent dir!");
|
throw new RuntimeException("Failed to create parent dir!");
|
||||||
|
|
Loading…
Reference in New Issue
Block a user