problem = true
break
end
- st = File.stat(destination)
+ begin
+ Dir.mkdir(destination)
+ rescue Errno::EEXIST
+ end
+ begin
+ st = File.stat(destination)
+ rescue
+ show_popup(dialog, utf8(_("Directory %s, where to move %s, is not valid or not createable.") % [destination, key.name]))
+ problem = true
+ break
+ end
if ! st.directory? || ! st.writable?
- show_popup(dialog, utf8(_("Directory where to move %s is not valid or not writable.") % key.name))
+ show_popup(dialog, utf8(_("Directory %s, where to move %s, is not valid or not writable.") % [destination, key.name]))
problem = true
break
end
label2entries[key].each { |entry|
begin
File.stat(File.join(destination, File.basename(entry.path)))
- show_popup(dialog, utf8(_("Sorry, a file '%s' already exists in '%s'.") % [ File.basename(entry.path), destination ]))
+ show_popup(dialog, utf8(_("Sorry, a file '%s' already exists in directory '%s'.") % [ File.basename(entry.path), destination ]))
problem = true
break
rescue