Open
Description
Bug description
- When selecting "-p" option in order to purge temp files after patch, severe error appears on deleting and all classes.dex files are preserved.
Error logs
No response
Solution
Seams like after
PatchCommand.kt :: 317
// region Save
apk.copyTo(temporaryFilesPath.resolve(apk.name), overwrite = true).apply {
patcherResult.applyTo(this)
}
All "files" contained in
patcherResult.dexFiles
Have streams open, and this prevents OS to delete them
A possible solution, since that streams are not used anymore, is to close them one by one:
// region Save
apk.copyTo(temporaryFilesPath.resolve(apk.name), overwrite = true).apply {
patcherResult.applyTo(this)
patcherResult.dexFiles.forEach{it.stream.close()}
}
Additional context
No response
Acknowledgements
- This issue is not a duplicate of an existing bug report.
- I have chosen an appropriate title.
- All requested information has been provided properly.