File tree Expand file tree Collapse file tree 1 file changed +13
-1
lines changed
SequenceAnalysis/src/org/labkey/sequenceanalysis/pipeline Expand file tree Collapse file tree 1 file changed +13
-1
lines changed Original file line number Diff line number Diff line change 4848import java .sql .ResultSet ;
4949import java .sql .SQLException ;
5050import java .util .ArrayList ;
51+ import java .util .Arrays ;
5152import java .util .Collection ;
5253import java .util .Collections ;
5354import java .util .HashMap ;
5455import java .util .HashSet ;
5556import java .util .LinkedHashSet ;
5657import java .util .List ;
5758import java .util .Map ;
59+ import java .util .Objects ;
5860import java .util .Set ;
61+ import java .util .stream .Collectors ;
5962
6063import static org .labkey .sequenceanalysis .pipeline .SequenceTaskHelper .SHARED_SUBFOLDER_NAME ;
6164
@@ -451,7 +454,16 @@ public boolean accept(File pathname)
451454 }
452455 }
453456
454- for (Container child : ContainerManager .getChildren (c ))
457+ List <Container > children = ContainerManager .getChildren (c );
458+
459+ // Check for unexpected subfolders:
460+ Set <String > allowableSubfolders = children .stream ().map (Container ::getName ).collect (Collectors .toSet ());
461+ Set <File > unknownFolders = Arrays .stream (Objects .requireNonNull (root .getRootPath ().getParentFile ().listFiles ())).filter (fn -> !fn .getName ().startsWith ("@" ) & !allowableSubfolders .contains (fn .getName ())).collect (Collectors .toSet ());
462+ if (!unknownFolders .isEmpty ()) {
463+ unknownFolders .forEach (x -> getJob ().getLogger ().warn ("Folder does not match expected child: " + x .getPath ()));
464+ }
465+
466+ for (Container child : children )
455467 {
456468 if (child .isWorkbook ())
457469 {
You can’t perform that action at this time.
0 commit comments