fabric-beta-publisher-plugin icon indicating copy to clipboard operation
fabric-beta-publisher-plugin copied to clipboard

/tmp space disk leak - temporary directory not removed after upload

Open chrismcx opened this issue 5 years ago • 2 comments

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;
    }

chrismcx avatar May 28 '19 13:05 chrismcx

👍

khurdz avatar May 28 '19 13:05 khurdz

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.

egor-n avatar Jun 01 '19 11:06 egor-n