diff --git a/src/main/java/net/preibisch/mvrecon/process/export/ExportN5Api.java b/src/main/java/net/preibisch/mvrecon/process/export/ExportN5Api.java index 3e1ac1ad..d5583eb7 100644 --- a/src/main/java/net/preibisch/mvrecon/process/export/ExportN5Api.java +++ b/src/main/java/net/preibisch/mvrecon/process/export/ExportN5Api.java @@ -243,10 +243,13 @@ else if ( storageType == StorageFormat.N5 || storageType == StorageFormat.ZARR ) // this is the relative path to the dataset inside the Zarr/N5/HDF5 container, thus using File here seems fine final String dataset = new File( new File( baseDataset , title ).toString(), datasetExtension ).toString(); + // e.g. in Windows this will change it to '\s0' + final String datasetExtensionOS = new File( datasetExtension ).toString(); + // setup multi-resolution pyramid mrInfo = N5ApiTools.setupMultiResolutionPyramid( driverVolumeWriter, - (level) -> dataset.substring(0, dataset.lastIndexOf( datasetExtension ) ) + "/s" + level, + (level) -> new File( dataset.substring(0, dataset.lastIndexOf( datasetExtensionOS ) ) + "/s" + level ).toString(), dataType, bb.dimensionsAsLongArray(), compression,