barasher / go-exiftool

Golang wrapper for Exiftool : extract as much metadata as possible (EXIF, ...) from files (pictures, pdf, office documents, ...)
GNU General Public License v3.0
250 stars 44 forks source link

fix scanner split infinite loop cause by extftool error output #46

Closed mel2oo closed 3 years ago

mel2oo commented 3 years ago

if exiftool parse file error, maybe return unknow string (This is usually caused by exifTool error output). e.g. filehash: 8e2a7aaeeee829f77b1a1029b9f7524879bbe399 outpuut: 'x' outside of string in unpack at /usr/share/perl5/vendor_perl/Image/ExifTool.pm line 5059.

mel2oo commented 3 years ago

exiftool output not always return string split by "{ready}\n" lot of times return a error message split by "\n"

barasher commented 3 years ago

Hi, thanks for the PR. Could you please add some unit tests ?

barasher commented 3 years ago

@switch-li, could you please have a look at my questions ?