Skip to content

Commit

Permalink
Operetta reader: don't add directories to the used files list
Browse files Browse the repository at this point in the history
  • Loading branch information
melissalinkert committed Oct 21, 2024
1 parent 6519516 commit 6352741
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions components/formats-gpl/src/loci/formats/in/OperettaReader.java
Original file line number Diff line number Diff line change
Expand Up @@ -350,10 +350,16 @@ protected void initFile(String id) throws FormatException, IOException {
LOGGER.trace("Found folder {}", folder);
if (!checkSuffix(folder, "tiff"))
{
String metadataFile = new Location(path, folder).getAbsolutePath();
if (!metadataFile.equals(currentFile.getAbsolutePath())) {
metadataFiles.add(metadataFile);
LOGGER.trace("Adding metadata file {}", metadataFile);
Location metadataLocation = new Location(path, folder);
if (!metadataLocation.isDirectory()) {
String metadataFile = metadataLocation.getAbsolutePath();
if (!metadataFile.equals(currentFile.getAbsolutePath())) {
metadataFiles.add(metadataFile);
LOGGER.trace("Adding metadata file {}", metadataFile);
}
}
else {
LOGGER.debug("Skipping metadata folder {}", metadataLocation);
}
}
}
Expand Down

0 comments on commit 6352741

Please sign in to comment.