From ae62cf2a66e0efda100e4f287a2da6a7f2dc7b83 Mon Sep 17 00:00:00 2001 From: Deborah Schmidt Date: Fri, 5 Jan 2024 11:43:00 +0100 Subject: [PATCH] XmlIOFileMapImgLoaderLOCI2: Do not parse Z grouped file paths Prevents "java.io.IOException: File name too long" for Z grouped file paths. --- .../imgloaders/filemap2/XmlIOFileMapImgLoaderLOCI2.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/main/java/net/preibisch/mvrecon/fiji/spimdata/imgloaders/filemap2/XmlIOFileMapImgLoaderLOCI2.java b/src/main/java/net/preibisch/mvrecon/fiji/spimdata/imgloaders/filemap2/XmlIOFileMapImgLoaderLOCI2.java index 8ec009d34..f8321d173 100644 --- a/src/main/java/net/preibisch/mvrecon/fiji/spimdata/imgloaders/filemap2/XmlIOFileMapImgLoaderLOCI2.java +++ b/src/main/java/net/preibisch/mvrecon/fiji/spimdata/imgloaders/filemap2/XmlIOFileMapImgLoaderLOCI2.java @@ -72,7 +72,11 @@ public Element toXml(FileMapImgLoaderLOCI2 imgLoader, File basePath) final Element fileMappingElement = new Element( FILE_MAPPING_TAG ); fileMappingElement.setAttribute( MAPPING_VS_TAG, Integer.toString( vid.getViewSetupId() ) ); fileMappingElement.setAttribute( MAPPING_TP_TAG, Integer.toString( vid.getTimePointId() ) ); - fileMappingElement.addContent( XmlHelpers.pathElement( MAPPING_FILE_TAG, pair.getA(), basePath ) ); + if (imgLoader.zGrouped) { + fileMappingElement.addContent( XmlHelpers.textElement( MAPPING_FILE_TAG, pair.getA().toString() ) ); + } else { + fileMappingElement.addContent( XmlHelpers.pathElement( MAPPING_FILE_TAG, pair.getA(), basePath ) ); + } fileMappingElement.setAttribute( MAPPING_SERIES_TAG, Integer.toString( pair.getB().getA() ) ); fileMappingElement.setAttribute( MAPPING_C_TAG, Integer.toString( pair.getB().getB() ) );