Fix NativeUtils. loading native Libraries from temp dir is possible
authorMaximilian Quellmalz <maximilian.quellmalz@mailbox.tu-dresden.de>
Tue, 11 Nov 2014 19:48:06 +0000 (20:48 +0100)
committerMaximilian Quellmalz <maximilian.quellmalz@mailbox.tu-dresden.de>
Tue, 11 Nov 2014 19:48:06 +0000 (20:48 +0100)
Splitter-ng-plugin-bitsplitter/src/cz/adamh/utils/NativeUtils.java
Splitter-ng-plugin-jerasure/src/cz/adamh/utils/NativeUtils.java

index d381efc..0f80bb6 100644 (file)
@@ -63,9 +63,8 @@ public class NativeUtils {
                }
  
                // Prepare temporary file
-               //Path tempDir = Files.createTempDirectory("tempfiles");
-               Path tempDir = Paths.get(System.getProperty("java.io.tmpdir"));
-               File temp = new File(tempDir.toString(),prefix+suffix);
+               String tempDir = System.getProperty("java.io.tmpdir");
+               File temp = new File(tempDir+"/"+prefix+suffix);
                Files.createFile(temp.toPath());
                temp.deleteOnExit();
                
index 33bf3d9..45fb10f 100644 (file)
@@ -58,7 +58,9 @@ public class NativeUtils {
                }
  
                // Prepare temporary file
-               File temp = File.createTempFile(prefix, suffix);
+               String tempDir = System.getProperty("java.io.tmpdir");
+               File temp = new File(tempDir+"/"+prefix+suffix);
+               Files.createFile(temp.toPath());
                temp.deleteOnExit();
  
                if (!temp.exists()) {