mirror of
https://github.com/revanced/Apktool.git
synced 2024-12-04 18:12:54 +01:00
make default framework detection on linux xdg-compliant (#2924)
On Linux, check first if $XDG_DATA_HOME is set, if not use path as it was before (~/.local/share/apktool)
This commit is contained in:
parent
f8df056a2c
commit
6a70be6c26
@ -973,10 +973,15 @@ final public class AndrolibResources {
|
||||
path = parentPath.getAbsolutePath() + String.format("%1$sLibrary%1$sapktool%1$sframework", File.separatorChar);
|
||||
} else if (OSDetection.isWindows()) {
|
||||
path = parentPath.getAbsolutePath() + String.format("%1$sAppData%1$sLocal%1$sapktool%1$sframework", File.separatorChar);
|
||||
} else {
|
||||
String xdgDataFolder = System.getenv("XDG_DATA_HOME");
|
||||
if (xdgDataFolder != null) {
|
||||
path = xdgDataFolder + String.format("%1$sapktool%1$sframework", File.separatorChar);
|
||||
} else {
|
||||
path = parentPath.getAbsolutePath() + String.format("%1$s.local%1$sshare%1$sapktool%1$sframework", File.separatorChar);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
File dir = new File(path);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user