Skip to content

Commit

Permalink
GT-3001 (NationalSecurityAgency#789) code review - add missing file e…
Browse files Browse the repository at this point in the history
…xclude.
  • Loading branch information
dev747368 committed Jul 22, 2019
1 parent 6c0171c commit c15364e
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ class RestoreTask extends AbstractFileExtractorTask {
private static final Set<String> FILES_TO_SKIP = Set.of( //
"/" + ArchivePlugin.JAR_VERSION_TAG.toLowerCase(),
"/" + ArchivePlugin.PROJECT_PROPERTY_FILE.toLowerCase(),
"/" + ArchivePlugin.PROJECT_STATE_FILE.toLowerCase(),
"/" + ArchivePlugin.OLD_PROJECT_SAVE_DIR.toLowerCase(),
"/" + ArchivePlugin.OLD_PROJECT_GROUPS_DIR.toLowerCase());

Expand Down Expand Up @@ -87,7 +88,7 @@ public void run(TaskMonitor monitor) throws CancelledException {
try (GFileSystem fs = fsService.openFileSystemContainer(archiveFSRL, monitor)) {
verifyArchive(fs, monitor);
startExtract(fs, null, monitor);
verifyRestoredProject();
createProjectMarkerFile();
openRestoredProject();
Msg.info(this, "Restore Archive: " + locInfo + " succeeded.");
}
Expand All @@ -106,7 +107,7 @@ public void run(TaskMonitor monitor) throws CancelledException {
}
}

private void verifyRestoredProject() throws IOException {
private void createProjectMarkerFile() throws IOException {
if (!projectFile.createNewFile()) {
throw new IOException("Couldn't create file " + projectFile.getAbsolutePath());
}
Expand Down

0 comments on commit c15364e

Please sign in to comment.