Skip to content

Commit

Permalink
'#2041: Reset finish flag after basic checks (already existing output).
Browse files Browse the repository at this point in the history
  • Loading branch information
wladimirleite committed Jan 3, 2024
1 parent d10c9ac commit 6ab310c
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions iped-engine/src/main/java/iped/engine/core/Manager.java
Original file line number Diff line number Diff line change
Expand Up @@ -246,8 +246,6 @@ public void process() throws Exception {

stats.printSystemInfo();

Files.deleteIfExists(getFinishedFileFlag(output).toPath());

output = output.getCanonicalFile();

args = (CmdLineArgs) caseData.getCaseObject(CmdLineArgs.class.getName());
Expand Down Expand Up @@ -871,6 +869,10 @@ private void prepareOutputFolder() throws Exception {
throw new IOException("Fail to create folder " + output.getAbsolutePath()); //$NON-NLS-1$
}

// The finished file flag should be reset after basic checks (like already
// existing output) were done (see issue #2041).
Files.deleteIfExists(getFinishedFileFlag(output).toPath());

if (!args.isAppendIndex() && !args.isContinue() && !args.isRestart() && args.getEvidenceToRemove() == null) {
IOUtil.copyDirectory(new File(Configuration.getInstance().appRoot, "lib"), new File(output, "lib"), true); //$NON-NLS-1$ //$NON-NLS-2$
IOUtil.copyDirectory(new File(Configuration.getInstance().appRoot, "scripts"), new File(output, "scripts"), true); //$NON-NLS-1$ //$NON-NLS-2$
Expand Down

0 comments on commit 6ab310c

Please sign in to comment.