make default framework detection on linux xdg-compliant
On Linux, check first if $XDG_DATA_HOME is set, if not use path as it was before (~/.local/share/apktool)
@@ -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);
