]> sjero.net Git - wget/blobdiff - src/init.c
[svn] Applied Dennis Smit's --preserve-permissions patch.
[wget] / src / init.c
index a92b5e114d2fba846b0d5d955d4a0990a4fa9645..abafecddd00d97e4fe42c2a6c8c4b2f8921d7c25 100644 (file)
@@ -185,6 +185,7 @@ static struct {
   { "passwd",          &opt.ftp_pass,          cmd_string },
   { "postdata",                &opt.post_data,         cmd_string },
   { "postfile",                &opt.post_file_name,    cmd_file },
+  { "preservepermissions", &opt.preserve_perm,     cmd_boolean },
   { "progress",                &opt.progress_type,     cmd_spec_progress },
   { "proxypasswd",     &opt.proxy_passwd,      cmd_string },
   { "proxyuser",       &opt.proxy_user,        cmd_string },
@@ -559,6 +560,7 @@ static int
 setval_internal (int comind, const char *com, const char *val)
 {
   assert (0 <= comind && comind < countof (commands));
+  DEBUGP (("Setting %s (%d) to %s\n", com, comind, val));
   return ((*commands[comind].action) (com, val, commands[comind].closure));
 }
 
@@ -575,6 +577,7 @@ setval_internal (int comind, const char *com, const char *val)
 void
 setoptval (const char *com, const char *val)
 {
+  assert (val != NULL);
   if (!setval_internal (command_by_name (com), com, val))
     exit (2);
 }