else
type = entry2type(file)
if type && !xmldir.elements["#{type}[@filename='#{utf8(file)}']"]
- if $commentsformat && type == 'image'
+ #- hack: don't run identify (which is slow) if format only contains default %t
+ if $commentsformat && type == 'image' && $commentsformat != '%t'
comment = utf8(`identify -format "#{$commentsformat}" '#{dir}/#{file}'`.chomp.sub(/\.$/, ''))
else
comment = utf8cut(file.sub(/\.[^\.]+$/, ''), 18)