> about what happened in a particular photo, and that doesn't look very nice
> as a caption
-when you merge current dir, startup may be very slow (many files
-in dir?) without the progressbar moving, we think it's frozen/dead..
-
properly detect ' in source directory names
else
msg 2, _("Examining %s...") % dir
entries = Dir.entries(dir).sort
+ #- preprocess all the existing elements, rexml is slow with that
+ optelements = []
+ xmldir.elements.each { |elem|
+ optelements << elem.name + '|' + elem.attributes['filename']
+ }
#- populate config in case of gen_config, add new files in case of merge_config
for file in entries
if file =~ /['"\[\]]/
msg 1, _("Ignoring %s, contains one of forbidden characters: '\"[]") % "#{dir}/#{file}"
else
type = entry2type(file)
- if type && !xmldir.elements["#{type}[@filename='#{utf8(file)}']"]
+ if type && ! optelements.include?(type + '|' + utf8(file))
#- 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(/\.$/, ''))