Skip to content

Commit ebd2f2d

Browse files
committed
Handle additional exception RangeError in timestamp converting
Imagine a Meta Info like GPS Date Time: 2024:02:24 15:50:140501265154082Z This resulted (with at least ruby 3.1.4) into "integer 140501265154082 too big to convert to `int'" /usr/local/rvm/rubies/ruby-3.1.4/lib/ruby/3.1.0/time.rb:264:in `utc' /usr/local/rvm/rubies/ruby-3.1.4/lib/ruby/3.1.0/time.rb:264:in `make_time' /usr/local/rvm/rubies/ruby-3.1.4/lib/ruby/3.1.0/time.rb:383:in `parse' /var/www/pictrs/shared/bundle/ruby/3.1.0/gems/mini_exiftool-2.10.4/lib/mini_exiftool.rb:454:in `convert_after_load'
1 parent e22d557 commit ebd2f2d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/mini_exiftool.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -457,7 +457,7 @@ def convert_after_load tag, value
457457
else
458458
raise MiniExiftool::Error.new("Value #{@opts[:timestamps]} not allowed for option timestamps.")
459459
end
460-
rescue ArgumentError
460+
rescue ArgumentError, RangeError
461461
value = false
462462
end
463463
when /^\+\d+\.\d+$/

0 commit comments

Comments
 (0)