ExifTool Forum

ExifTool => Bug Reports / Feature Requests => Topic started by: vladak on May 31, 2012, 06:08:04 PM

Title: exiftool should check for GPS file existence
Post by: vladak on May 31, 2012, 06:08:04 PM
Consider this a bug report:

When run with inaccessible/non-existent file, exiftool will complain for each photo (see example below). Instead, it should check the geotag file before running and bailing out immediately if it cannot be read. The same check is done for the photo directory already.

$ exiftool -geosync=+10:15:00 -geotag /totally/non/existent/GPS/file.log foo
Warning: Error opening GPS file '/totally/non/existent/GPS/file.log' in File:Geotag (ValueConvInv)
Warning: GPS track is empty in File:Geotime (ValueConvInv) - foo/DSC00400.JPG
Warning: No writable tags set from foo/DSC00400.JPG
Warning: GPS track is empty in File:Geotime (ValueConvInv) - foo/DSC00401.JPG
Warning: No writable tags set from foo/DSC00401.JPG
Warning: GPS track is empty in File:Geotime (ValueConvInv) - foo/DSC00402.JPG
Warning: No writable tags set from foo/DSC00402.JPG
Warning: GPS track is empty in File:Geotime (ValueConvInv) - foo/DSC00403.JPG
Warning: No writable tags set from foo/DSC00403.JPG
Warning: GPS track is empty in File:Geotime (ValueConvInv) - foo/DSC00404.JPG
Warning: No writable tags set from foo/DSC00404.JPG
Warning: GPS track is empty in File:Geotime (ValueConvInv) - foo/DSC00405.JPG
Warning: No writable tags set from foo/DSC00405.JPG
Warning: GPS track is empty in File:Geotime (ValueConvInv) - foo/DSC00406.JPG
Warning: No writable tags set from foo/DSC00406.JPG
Warning: GPS track is empty in File:Geotime (ValueConvInv) - foo/DSC00407.JPG
Warning: No writable tags set from foo/DSC00407.JPG
Warning: GPS track is empty in File:Geotime (ValueConvInv) - foo/DSC00408.JPG
Warning: No writable tags set from foo/DSC00408.JPG
Warning: GPS track is empty in File:Geotime (ValueConvInv) - foo/DSC00409.JPG
Warning: No writable tags set from foo/DSC00409.JPG
    1 directories scanned
    0 image files updated
   10 image files unchanged



This is happening on Mac OS X with exiftool 8.93 but I guess it is generic.
Title: Re: exiftool should check for GPS file existence
Post by: Phil Harvey on June 01, 2012, 07:27:43 AM
Thanks for this suggestion.

I see your point in this particular case, but the Geotag feature is implemented in the same general technique as setting any other tag.

In general, when information is being copied from a file (in this case: "-geotime<datetimeoriginal"), ExifTool doesn't know that it has nothing to write until after it reads the file.  Yes, it is true that setting Geotime will always fail if no track log is loaded, but I don't think just aborting the command when the track log isn't found would be a good idea -- you may want the command to continue on to write some other tags in this case.

- Phil