Skip to content

Commit

Permalink
fix:Fix Path Reading Errors When Called from External Projects
Browse files Browse the repository at this point in the history
  • Loading branch information
liyongfei committed Sep 26, 2024
1 parent 1d27b02 commit 9c7bf2a
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/main/java/org/gmssl/NativeLoader.java
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
import java.io.*;
import java.nio.file.Files;
import java.nio.file.Path;
import java.nio.file.Paths;
import java.nio.file.StandardCopyOption;
import java.util.HashMap;
import java.util.Map;
Expand Down Expand Up @@ -57,7 +56,7 @@ public static void load(String library) {
return;
}
Path tempFile = null;
String resourceLibPath = Paths.get(RESOURCELIB_PREFIXPATH, library + "." + libExtension()).toString();
String resourceLibPath = RESOURCELIB_PREFIXPATH + "/" + library + "." + libExtension();
try (InputStream inputStream = NativeLoader.class.getClassLoader().getResourceAsStream(resourceLibPath)) {
tempFile = Files.createTempFile(library, "." + libExtension());
tempFile.toFile().deleteOnExit();
Expand Down

0 comments on commit 9c7bf2a

Please sign in to comment.