From 2a8f053901323b1dc15760676aa24b8e9cf5cd64 Mon Sep 17 00:00:00 2001 From: "Christian P. MOMON" Date: Sat, 17 Oct 2020 17:56:56 +0200 Subject: [PATCH] Improved Builder clear action. --- src/fr/devinsy/statoolinfos/build/Builder.java | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/src/fr/devinsy/statoolinfos/build/Builder.java b/src/fr/devinsy/statoolinfos/build/Builder.java index 1b627a7..731e727 100644 --- a/src/fr/devinsy/statoolinfos/build/Builder.java +++ b/src/fr/devinsy/statoolinfos/build/Builder.java @@ -130,15 +130,12 @@ public class Builder } else { - File buildDirectory = configuration.getBuildDirectory(); + File file = new File(configuration.getBuildDirectory(), configuration.getBuildInput().getName()); - for (File file : buildDirectory.listFiles()) + if ((file.isFile()) && (StringUtils.endsWithAny(file.getName(), ".properties"))) { - if ((file.isFile()) && (StringUtils.endsWithAny(file.getName(), ".properties"))) - { - logger.info("Deleting " + file.getName()); - file.delete(); - } + logger.info("BUILDER : Deleting {}", file.getAbsolutePath()); + file.delete(); } } }