mirror of
https://github.com/revanced/Apktool.git
synced 2024-12-12 13:57:46 +01:00
fix: prevent file hold on tmpDir during build (#2745)
This commit is contained in:
parent
ddc4bb360a
commit
797fc3e332
@ -498,7 +498,8 @@ public class Androlib {
|
||||
"AndroidManifest.xml"), new File(appDir, "res"),
|
||||
ninePatch, null, parseUsesFramework(usesFramework));
|
||||
|
||||
Directory tmpDir = new ExtFile(apkFile).getDirectory();
|
||||
ExtFile tmpExtFile = new ExtFile(apkFile);
|
||||
Directory tmpDir = tmpExtFile.getDirectory();
|
||||
|
||||
// Sometimes an application is built with a resources.arsc file with no resources,
|
||||
// Apktool assumes it will have a rebuilt arsc file, when it doesn't. So if we
|
||||
@ -509,6 +510,8 @@ public class Androlib {
|
||||
: APK_RESOURCES_WITHOUT_RES_FILENAMES);
|
||||
} catch (DirectoryException ex) {
|
||||
LOGGER.warning(ex.getMessage());
|
||||
} finally {
|
||||
tmpExtFile.close();
|
||||
}
|
||||
|
||||
// delete tmpDir
|
||||
|
Loading…
Reference in New Issue
Block a user