- for (Path variantContributionPath : Files.newDirectoryStream(variantPath.getParent())) {
- String variantContributionId = variantContributionPath.getFileName().toString();
- if (variantContributionId.contains(".")) {
- A2Contribution contribution = getOrAddContribution(variantContributionId);
- contributions.put(variantContributionPath, contribution);
+ if (Files.exists(variantPath.getParent())) {
+ for (Path variantContributionPath : Files.newDirectoryStream(variantPath.getParent())) {
+ String variantContributionId = variantContributionPath.getFileName().toString();
+ if (variantContributionId.contains(".")) {
+ A2Contribution contribution = getOrAddContribution(variantContributionId);
+ contributions.put(variantContributionPath, contribution);
+ }