-
Notifications
You must be signed in to change notification settings - Fork 58
Open
Description
I am using version 10.01 of exiftool.
I constructed the ExifTool with Feature.STAY_OPEN.
The version compare section of the checkFeatureSupport method uses a string compare and it returns false for supported.
Please change the versions to double or float for the comparison.
Existing code
if (ver != null && ver.compareTo(feature.version) >= 0) {
supported = Boolean.TRUE;
log("\t\tFound ExifTool version %s, feature %s is SUPPORTED.",
ver, feature);
} else {
supported = Boolean.FALSE;
log("\t\tFound ExifTool version %s, feature %s is NOT SUPPORTED.",
ver, feature);
}
My solution
if(ver != null){
double verDouble = Double.parseDouble(ver);
double featureVerDouble = Double.parseDouble(feature.version);
if(verDouble >= featureVerDouble){
supported = Boolean.TRUE;
log("\t\tFound ExifTool version %s, feature %s is SUPPORTED.",
ver, feature);
}else {
supported = Boolean.FALSE;
log("\t\tFound ExifTool version %s, feature %s is NOT SUPPORTED.",
ver, feature);
}
} else {
supported = Boolean.FALSE;
log("\t\tFound ExifTool version %s, feature %s is NOT SUPPORTED.",
ver, feature);
}
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels