Merged WOLF-6 (WOLF.0.0) to 5.1.1 (5.1.1)

122752 mward: UTF-378: Delete temp files when no longer needed


git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/services/full-installer/branches/5.1.1@124001 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Mark Rogers
2016-03-15 11:50:57 +00:00
parent d2a2b48ee9
commit c4d708e392

View File

@@ -136,6 +136,9 @@ public class FileTreeCompareImpl implements FileTreeCompare
File f1 = preprocessFile(tree1, result.p1.toFile()); File f1 = preprocessFile(tree1, result.p1.toFile());
File f2 = preprocessFile(tree2, result.p2.toFile()); File f2 = preprocessFile(tree2, result.p2.toFile());
contentMatches = FileUtils.contentEquals(f1, f2); contentMatches = FileUtils.contentEquals(f1, f2);
// Delete the files now that we no longer need them. The originals are still available.
f1.delete();
f2.delete();
if (contentMatches) if (contentMatches)
{ {
// If the preprocessed files match, then although the files didn't // If the preprocessed files match, then although the files didn't
@@ -143,8 +146,6 @@ public class FileTreeCompareImpl implements FileTreeCompare
// But add to the stats that this is what has happened. // But add to the stats that this is what has happened.
stats.suppressedDifferenceCount++; stats.suppressedDifferenceCount++;
} }
// f1.delete();
// f2.delete();
} }
else if (isSpecialArchive(pathToFind)) else if (isSpecialArchive(pathToFind))
{ {