From 610ff22abe4cf9ca5840fc24f52387810bf91058 Mon Sep 17 00:00:00 2001 From: Anthony Stirling <77850077+Frooodle@users.noreply.github.com> Date: Fri, 29 Dec 2023 13:53:55 +0000 Subject: [PATCH] empty dir fix --- .../controller/api/pipeline/PipelineDirectoryProcessor.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/main/java/stirling/software/SPDF/controller/api/pipeline/PipelineDirectoryProcessor.java b/src/main/java/stirling/software/SPDF/controller/api/pipeline/PipelineDirectoryProcessor.java index bc078a81..a73e1ca7 100644 --- a/src/main/java/stirling/software/SPDF/controller/api/pipeline/PipelineDirectoryProcessor.java +++ b/src/main/java/stirling/software/SPDF/controller/api/pipeline/PipelineDirectoryProcessor.java @@ -117,6 +117,10 @@ public class PipelineDirectoryProcessor { for (PipelineOperation operation : config.getOperations()) { validateOperation(operation); File[] files = collectFilesForProcessing(dir, jsonFile, operation); + if(files == null || files.length == 0) { + logger.info("No files detected for {} ", dir); + return; + } List filesToProcess = prepareFilesForProcessing(files, processingDir); runPipelineAgainstFiles(filesToProcess, config, dir, processingDir); }