diff --git a/src/main/java/org/janelia/saalfeldlab/n5/universe/N5DatasetDiscoverer.java b/src/main/java/org/janelia/saalfeldlab/n5/universe/N5DatasetDiscoverer.java index 06c4d26..11842e4 100644 --- a/src/main/java/org/janelia/saalfeldlab/n5/universe/N5DatasetDiscoverer.java +++ b/src/main/java/org/janelia/saalfeldlab/n5/universe/N5DatasetDiscoverer.java @@ -454,9 +454,7 @@ public N5TreeNode discoverAndParseRecursive(final N5TreeNode root, final Consume } callback.accept(root); - // because we did a shallow metadata parsing already, skip parsing for this node - // when parsing recursively - parseMetadataRecursive(root, callback, true); + parseMetadataRecursive(root, callback); sortAndTrimRecursive(root, callback); return root; @@ -542,13 +540,16 @@ public void parseMetadataRecursive(final N5TreeNode rootNode) { * @param callback the callback function */ public void parseMetadataRecursive(final N5TreeNode rootNode, final Consumer callback) { - parseMetadataRecursive(rootNode, callback, false); + parseMetadataRecursive(rootNode, callback, true); } /** * Parses metadata for the given node and all children in parallel using this * object's executor. The given function is called for every node after parsing * is completed, successful or not. + *

+ * The skipParsingIfPresent argument allows parsing to be skipped if metadata for this node + * are already present. This should generally be true. * * @param rootNode the root node * @param callback the callback function @@ -596,7 +597,7 @@ public void parseMetadataRecursive(final N5TreeNode rootNode, final Consumer