Issue #3507 Merge fixes for Archive Case Creation.

Former-commit-id: 4f946d4921 [formerly d7b2355016 [formerly 2263bd75920d4fbaf2bfc3445e4b320291401c16]]
Former-commit-id: d7b2355016
Former-commit-id: c4655dbe88
This commit is contained in:
Roger Ferrel 2014-08-07 14:17:24 -05:00
parent 145f815f10
commit 9fab96476f
2 changed files with 21 additions and 8 deletions

View file

@ -187,6 +187,7 @@ public class CaseCreationDlg extends AbstractArchiveDlg {
this.type = Type.Case;
this.setSelect = false;
this.type = Type.Case;
this.defaultCaseDir = defaultCaseDir;
this.ccManager = new CaseCreationManager();
}

View file

@ -661,18 +661,19 @@ public class GenerateCaseDlg extends CaveSWTDialog {
try {
// Allow the caseCopy to clean its resources.
caseCopy.finishCase();
} catch (CaseCreateException ex) {
} catch (Exception ex) {
// Ignore
}
caseCopy = null;
}
timer.stop();
if (statusHandler.isPriorityEnabled(Priority.INFO)) {
String message = String.format("Case %s took %s.",
caseDir.getName(),
TimeUtil.prettyDuration(timer.getElapsedTime()));
statusHandler.handle(Priority.INFO, message);
}
timer.stop();
if (statusHandler.isPriorityEnabled(Priority.INFO)) {
String message = String
.format("Case %s took %s.", caseDir.getName(),
TimeUtil.prettyDuration(timer
.getElapsedTime()));
statusHandler.handle(Priority.INFO, message);
}
}
// Release current lock.
@ -1356,6 +1357,17 @@ public class GenerateCaseDlg extends CaveSWTDialog {
zipStream.flush();
fileStream.flush();
/*
* Most likely over estimates the size since it is unknown how well
* file will compress.
*/
long size = tarFile.length() + file.length();
if (size >= splitSize) {
closeStreams();
openStreams();
addParentDir(file);
}
}
}
/** Task to update the lock plugin's last execute time. */