Skip to content

Commit

Permalink
asconfigc: does not delete the root folder of the output path when cl…
Browse files Browse the repository at this point in the history
…eaning
  • Loading branch information
joshtynjala committed Feb 5, 2021
1 parent 9a065ac commit 50998ce
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion asconfigc/src/main/java/com/as3mxml/asconfigc/ASConfigC.java
Original file line number Diff line number Diff line change
Expand Up @@ -1006,7 +1006,8 @@ private void deleteOutputDirectory(Path outputPath) throws ASConfigCException {
System.out.println("Deleting: " + outputPath);
}
try {
Files.walk(outputPath).sorted(Comparator.reverseOrder()).map(Path::toFile).forEach(File::delete);
Files.walk(outputPath).sorted(Comparator.reverseOrder()).filter(path -> !path.equals(outputPath))
.map(Path::toFile).forEach(File::delete);
} catch (IOException e) {
throw new ASConfigCException("Failed to clean project because an I/O exception occurred.");
}
Expand Down

0 comments on commit 50998ce

Please sign in to comment.