diff --git a/src/org/forkalsrud/album/exif/DirectoryEntry.java b/src/org/forkalsrud/album/exif/DirectoryEntry.java index 3c4d38c..b27d1d8 100644 --- a/src/org/forkalsrud/album/exif/DirectoryEntry.java +++ b/src/org/forkalsrud/album/exif/DirectoryEntry.java @@ -194,9 +194,6 @@ public class DirectoryEntry extends Entry { Metadata metadata; try { metadata = JpegMetadataReader.readMetadata(f); - } catch (Exception e) { - throw new RuntimeException("problem reading file " + f.getPath(), e); - } Directory exifDirectory = metadata.getDirectory(ExifDirectory.class); if (exifDirectory.containsTag(ExifDirectory.TAG_ORIENTATION)) { int orientation = exifDirectory.getInt(ExifDirectory.TAG_ORIENTATION); @@ -227,6 +224,9 @@ public class DirectoryEntry extends Entry { props.setProperty(base + "dimensions", new Dimension(width, height).toString()); hasDim = true; } + } catch (Exception e) { + throw new RuntimeException("problem reading file " + f.getPath(), e); + } props.setProperty(base + "etag", Integer.toHexString(name.hashCode() + Long.valueOf(f.lastModified()).hashCode())); if (!hasDate) { props.setProperty(base + "captureDate", sdf.format(new Date(f.lastModified())));