Skip to content

Commit 34597f5

Browse files
committed
* Prevent Loader.load() from trying to load library files that do not exist or to create symbolic links to them
1 parent 665daa1 commit 34597f5

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11

2+
* Prevent `Loader.load()` from trying to load library files that do not exist or to create symbolic links to them
23
* Let `Loader.load()` extract libraries suffixed with `##`, but still ignored for copying by `Builder`
34
* Make sure `Loader.load()` also initializes classes that are passed explicitly
45
* Fix `Loader.createLibraryLink()` incorrectly truncating library versions when there is one before and another after the suffix

src/main/java/org/bytedeco/javacpp/Loader.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1047,7 +1047,7 @@ public static String load(Class cls, Properties properties, boolean pathsFirst)
10471047
}
10481048
URL[] urls = findLibrary(cls, p, preload, pathsFirst);
10491049
String filename = loadLibrary(urls, preload, preloaded.toArray(new String[preloaded.size()]));
1050-
if (filename != null) {
1050+
if (filename != null && new File(filename).exists()) {
10511051
preloaded.add(filename);
10521052
if (loadGlobally) {
10531053
preloadGlobals.add(filename);

0 commit comments

Comments
 (0)