catch (Exception e) {
log.log(Level.WARNING, "Failed to export mail " + tempFile, e);
}
}
else {
<BUG>File destFile = makeUniqueExportFileName(dir, tempFile);
</BUG>
if (log.isLoggable(Level.INFO)) log.info("Export issue attachment to destFile=" + destFile);
if (!destFile.exists()) {
Files.copy(tempFile.toPath(), destFile.toPath());

catch (Exception e) {
log.log(Level.WARNING, "Failed to export mail " + tempFile, e);
}
}
else {
File destFile = makeUniqueExportFileName(dir, tempFile, cbSave.createChild(0.5));
if (log.isLoggable(Level.INFO)) log.info("Export issue attachment to destFile=" + destFile);
if (!destFile.exists()) {
Files.copy(tempFile.toPath(), destFile.toPath());
