elsif File.directory?(destdir) && Dir.entries(destdir).size > 2
keepon = !show_popup(dialog, utf8(_("The destination directory already exists. Are you sure you want to continue?")), { :okcancel => true })
dest.grab_focus
- elsif File.exists?(destdir)
+ elsif File.exists?(destdir) && !File.directory?(destdir)
show_popup(dialog, utf8(_("There is already a file by the name of the destination directory. Please choose another one.")))
dest.grab_focus
elsif !theme_sizes.detect { |e| e[:value] != 'original' && e[:widget].active? }