File tree Expand file tree Collapse file tree
java/kotlin-extractor/src/main/java/com/semmle/util/files Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -30,9 +30,14 @@ func init() {
3030 }
3131 p , err := d .FindProc ("resolve_subst" )
3232 if err != nil {
33+ d .Release ()
34+ return
35+ }
36+ f , err := d .FindProc ("resolve_subst_free" )
37+ if err != nil {
38+ d .Release ()
3339 return
3440 }
35- f , _ := d .FindProc ("resolve_subst_free" )
3641 dll = d
3742 procResolve = p
3843 procFree = f
Original file line number Diff line number Diff line change @@ -18,7 +18,7 @@ public class SubstResolver {
1818 boolean loaded = false ;
1919 if (File .separatorChar == '\\' ) {
2020 String dist = System .getenv ("CODEQL_DIST" );
21- if (dist != null && !dist .isEmpty ()) {
21+ if (dist != null && !dist .isEmpty ()) {
2222 try {
2323 Path library = Paths .get (dist ).resolve ("tools" )
2424 .resolve ("win64" ).resolve ("canonicalize.dll" ).toAbsolutePath ();
@@ -61,7 +61,12 @@ public static File resolve(File f) {
6161 return f ;
6262 }
6363
64- String resolved = nativeResolveSubst (path .substring (0 , 3 ));
64+ String resolved ;
65+ try {
66+ resolved = nativeResolveSubst (path .substring (0 , 3 ));
67+ } catch (UnsatisfiedLinkError ignored ) {
68+ return f ;
69+ }
6570 if (resolved == null ) {
6671 return f ;
6772 }
You can’t perform that action at this time.
0 commit comments