LH 3 vuotta sitten
vanhempi
commit
1733ab1524

+ 10 - 5
SenaBitWiggler/src/main/java/de/nplusc/izc/senabitwiggler/EntryPoint.java

@@ -185,11 +185,16 @@ public class EntryPoint
 
     private static void extractFirmwareLong(File input, String output) throws InputInvalidException {
         byte filler = 0x00;
-       if(!input.getParentFile().mkdirs())
-       {
-           System.err.println("WTF! somethint ate shit");
-           return;
-       }
+        File od = (new File(output));
+        if(!(od.exists()&&od.isDirectory()))
+        {
+            if(!od.mkdirs())
+            {
+                System.err.println("WTF! somethint ate shit");
+                return;
+            }
+        }
+
 
         try (RandomAccessFile f = new RandomAccessFile(input,"r")) {
             LongHeader hdr = new LongHeader();