fabric-beta-publisher-plugin
fabric-beta-publisher-plugin copied to clipboard
/tmp space disk leak - temporary directory not removed after upload
Hi,
I've found an issue on Fabric beta publisher plugin. On FileUtils.java, Fabric plugin extracts the Crashlytics zip into a temporary folder (method extractCrashlyticsJar). However, this temporary folder is never deleted. So at least, our /tmp partition is full and we have to manually delete all temporary folders created.
We cannot easily fix this issue because the "crashlyticsJar
" variable is not returned by the extractCrashlyticsJar
method.
Can you fix this ?
The code in error
static File extractCrashlyticsJar(File crashlyticsZip, PrintStream logger) throws IOException {
File crashlyticsJar = createTempDirectory(); // **NEVER DELETED**
unzip(crashlyticsZip.getAbsolutePath(), crashlyticsJar);
File crashlyticsZipFile = new File(crashlyticsJar, "crashlytics-devtools.jar");
delete(logger, crashlyticsZip);
return crashlyticsZipFile;
}
👍
The Crashlytics zip file contains a single JAR file which is returned in this method. Then, it is deleted in the FabricBetaPublisher#publishFabric
method at the end.