I have compressed file on MacOS and I came to know that while compressing file some junk file like .DS_Store and __MACOSX added in the zip file. Unzipping is not happening properly from the below code. Is there way I can ignore this junk file while doing unzipping?
public static void unzip(@NonNull final String zipFilePath, @NonNull final String destDir) {
try {
new ZipFile(zipFilePath).extractAll(destDir);
log.info("Unzip completed for zipFilePath:{}", zipFilePath);
} catch (final Exception e) {
throw ExceptionTranslator.translate(e, String.format("Unzip failed for %s ", zipFilePath));
}
}