fix: use correct property for OS arch checks (#2830)
This commit is contained in:
@@ -84,14 +84,15 @@ public class JadxCommonFiles {
|
||||
* Return JNI, Foreign or PowerShell implementation
|
||||
*/
|
||||
private static Windows getWinDirs() {
|
||||
Windows defSup = Windows.getDefaultSupplier().get();
|
||||
if (defSup instanceof WindowsPowerShell) {
|
||||
Windows impl = Windows.getDefaultSupplier().get();
|
||||
if (impl instanceof WindowsPowerShell) {
|
||||
if (JadxSystemInfo.IS_AMD64) {
|
||||
// JNI library compiled for x86-64
|
||||
return new WindowsJni();
|
||||
// JNI library compiled only for x86-64
|
||||
impl = new WindowsJni();
|
||||
}
|
||||
}
|
||||
return defSup;
|
||||
LOG.debug("Using win dirs implementation: {}", impl.getClass().getSimpleName());
|
||||
return impl;
|
||||
}
|
||||
|
||||
public Path getCacheDir() {
|
||||
|
||||
@@ -2,6 +2,7 @@ package jadx.commons.app;
|
||||
|
||||
import java.util.Locale;
|
||||
|
||||
@SuppressWarnings("unused")
|
||||
public class JadxSystemInfo {
|
||||
public static final String JAVA_VM = System.getProperty("java.vm.name", "?");
|
||||
public static final String JAVA_VER = System.getProperty("java.version", "?");
|
||||
@@ -16,7 +17,7 @@ public class JadxSystemInfo {
|
||||
public static final boolean IS_LINUX = !IS_WINDOWS && !IS_MAC;
|
||||
public static final boolean IS_UNIX = !IS_WINDOWS;
|
||||
|
||||
private static final String OS_ARCH_LOWER = OS_NAME.toLowerCase(Locale.ENGLISH);
|
||||
private static final String OS_ARCH_LOWER = OS_ARCH.toLowerCase(Locale.ENGLISH);
|
||||
public static final boolean IS_AMD64 = OS_ARCH_LOWER.equals("amd64");
|
||||
public static final boolean IS_ARM64 = OS_ARCH_LOWER.equals("aarch64");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user