when '--config-skel'
arg = File.expand_path(arg)
if File.exists?(arg)
- msg 1, _("Config skeleton file already exists, backuping to %s.backup") % arg
- File.rename(arg, "#{arg}.backup")
+ if File.directory?(arg)
+ die _("Config skeleton file (%s) already exists and is a directory! Please change the filename.") % arg
+ else
+ msg 1, _("Config skeleton file already exists, backuping to %s.backup") % arg
+ File.rename(arg, "#{arg}.backup")
+ end
end
$config_writeto = arg
$mode = 'gen_config'