File tree Expand file tree Collapse file tree 1 file changed +19
-1
lines changed
src/java.smartcardio/unix/classes/sun/security/smartcardio Expand file tree Collapse file tree 1 file changed +19
-1
lines changed Original file line number Diff line number Diff line change @@ -110,8 +110,26 @@ private static String getLibraryName() throws IOException {
110
110
// if LIB2 exists, use that
111
111
return lib ;
112
112
}
113
+
114
+ // As of macos 11, framework libraries have been removed from the file
115
+ // system, but in such a way that they can still be dlopen()ed, even
116
+ // though they can no longer be open()ed.
117
+ //
118
+ // https://developer.apple.com/documentation/macos-release-notes/macos-big-sur-11_0_1-release-notes
119
+ //
120
+ // """New in macOS Big Sur 11.0.1, the system ships with a built-in
121
+ // dynamic linker cache of all system-provided libraries. As part of
122
+ // this change, copies of dynamic libraries are no longer present on
123
+ // the filesystem. Code that attempts to check for dynamic library
124
+ // presence by looking for a file at a path or enumerating a directory
125
+ // will fail. Instead, check for library presence by attempting to
126
+ // dlopen() the path, which will correctly check for the library in the
127
+ // cache."""
128
+ //
129
+ // The directory structure remains otherwise intact, so check for
130
+ // existence of the containing directory instead of the file.
113
131
lib = PCSC_FRAMEWORK ;
114
- if (new File (lib ).isFile ()) {
132
+ if (new File (lib ).getParentFile (). isDirectory ()) {
115
133
// if PCSC.framework exists, use that
116
134
return lib ;
117
135
}
You can’t perform that action at this time.
0 commit comments