From 33dcdb940c424974d7ea513075b2da3d4766a5af Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Besson?= Date: Tue, 20 Aug 2024 10:59:17 +0100 Subject: [PATCH] Fix order of the directory separator when download an image Ensure the internal repository path is applied after the fileset separator so that the internal structure is preserved and the data can be read by Bio-Formats --- .../java/omero/gateway/facility/TransferFacilityHelper.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/omero/gateway/facility/TransferFacilityHelper.java b/src/main/java/omero/gateway/facility/TransferFacilityHelper.java index 575a7b87..71892dc4 100644 --- a/src/main/java/omero/gateway/facility/TransferFacilityHelper.java +++ b/src/main/java/omero/gateway/facility/TransferFacilityHelper.java @@ -135,7 +135,7 @@ List downloadImage(SecurityContext context, String targetPath, for (FilesetEntry fse: fs.copyUsedFiles()) { OriginalFile of = fse.getOriginalFile(); String ofDir = of.getPath().getValue().replace(repoPath, ""); - File outDir = new File(targetPath+File.separator+ofDir+File.separator+fs_dir); + File outDir = new File(targetPath+File.separator+fs_dir+File.separator+ofDir); outDir.mkdirs(); File saved = saveOriginalFile(context, of, outDir); if (saved != null)