File tree Expand file tree Collapse file tree
src/main/java/org/janelia/saalfeldlab/n5 Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -57,19 +57,11 @@ default void createGroup(final String path) throws N5Exception {
5757 // avoid hitting the backend if this path is already a group according to the cache
5858 // else if exists is true (then a dataset is present) so throw an exception to avoid
5959 // overwriting / invalidating existing data
60- if (cacheMeta ()) {
61- if (getCache ().isGroup (normalPath , getAttributesKey ()))
62- return ;
63- else if (getCache ().exists (normalPath , getAttributesKey ())) {
64- throw new N5Exception ("Can't make a group on existing path." );
65- }
66- }
60+ if (groupExists (normalPath ))
61+ return ;
62+ else if (datasetExists (normalPath ))
63+ throw new N5Exception ("Can't make a group on existing dataset." );
6764
68- // N5Writer.super.createGroup(path);
69- /*
70- * the lines below duplicate the single line above but would have to call
71- * normalizeGroupPath again the below duplicates code, but avoids extra work
72- */
7365 getKeyValueAccess ().createDirectories (absoluteGroupPath (normalPath ));
7466
7567 if (cacheMeta ()) {
You can’t perform that action at this time.
0 commit comments