mirror of
https://github.com/revanced/Apktool.git
synced 2024-12-04 10:02:55 +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
@ -974,7 +974,12 @@ final public class AndrolibResources {
|
||||
} else if (OSDetection.isWindows()) {
|
||||
path = parentPath.getAbsolutePath() + String.format("%1$sAppData%1$sLocal%1$sapktool%1$sframework", File.separatorChar);
|
||||
} else {
|
||||
path = parentPath.getAbsolutePath() + String.format("%1$s.local%1$sshare%1$sapktool%1$sframework", File.separatorChar);
|
||||
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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user