Do not try to clean non existing directories
authorMathieu Baudier <mbaudier@argeo.org>
Sat, 7 Oct 2023 03:56:14 +0000 (05:56 +0200)
committerMathieu Baudier <mbaudier@argeo.org>
Sat, 7 Oct 2023 03:56:14 +0000 (05:56 +0200)
src/org/argeo/build/Repackage.java

index b594f3a19b44e4aff5ee3d62a772e845a8928225..f0d048c988702cac6b67aa5874813b5af1215096 100644 (file)
@@ -119,6 +119,8 @@ public class Repackage {
        /** Deletes remaining sub directories. */
        void cleanPreviousFailedBuild(Path categoryPath) {
                Path outputCategoryPath = a2Base.resolve(categoryPath);
+               if (!Files.exists(outputCategoryPath))
+                       return;
                // clean previous failed build
                try {
                        for (Path subDir : Files.newDirectoryStream(outputCategoryPath, (d) -> Files.isDirectory(d))) {