mirror of
https://github.com/moparisthebest/wget
synced 2024-07-03 16:38:41 -04:00
[svn] Applied Dennis Smit's --preserve-permissions patch.
This commit is contained in:
parent
b46a8df58d
commit
ad75dd2662
@ -1,3 +1,14 @@
|
||||
2003-11-05 Dennis Smit <ds@nerds-incorporated.org>
|
||||
|
||||
* main.c: (main): added --preserve-permissions option.
|
||||
|
||||
* ftp.c (ftp_retrieve_list): added support for
|
||||
--preserve-permissions option.
|
||||
|
||||
* init.c: added support for --preserve-permission option.
|
||||
|
||||
* option.h: added support for --preserve-permission option.
|
||||
|
||||
2003-11-06 Hrvoje Niksic <hniksic@xemacs.org>
|
||||
|
||||
* main.c (init_switches): New function. Convert option_data to
|
||||
|
@ -1630,7 +1630,10 @@ Already have correct symlink %s -> %s\n\n"),
|
||||
logprintf (LOG_NOTQUIET, _("%s: corrupt time-stamp.\n"), con->target);
|
||||
|
||||
if (f->perms && f->type == FT_PLAINFILE && dlthis)
|
||||
chmod (con->target, f->perms);
|
||||
{
|
||||
if (opt.preserve_perm)
|
||||
chmod (con->target, f->perms);
|
||||
}
|
||||
else
|
||||
DEBUGP (("Unrecognized permissions for %s.\n", con->target));
|
||||
|
||||
|
@ -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 },
|
||||
|
18
src/main.c
18
src/main.c
@ -212,6 +212,7 @@ struct cmdline_option option_data[] =
|
||||
{ "passive-ftp", 0, OPT_BOOLEAN, "passiveftp", -1 },
|
||||
{ "post-data", 0, OPT_VALUE, "postdata", -1 },
|
||||
{ "post-file", 0, OPT_VALUE, "postfile", -1 },
|
||||
{ "preserve-permissions", 0, OPT_BOOLEAN, "preservepermissions", -1 },
|
||||
{ "progress", 0, OPT_VALUE, "progress", -1 },
|
||||
{ "proxy", 'Y', OPT_BOOLEAN, "useproxy", -1 },
|
||||
{ "proxy-passwd", 0, OPT_VALUE, "proxypasswd", -1 },
|
||||
@ -462,14 +463,15 @@ FTP options:\n\
|
||||
\n"), stdout);
|
||||
fputs (_("\
|
||||
Recursive retrieval:\n\
|
||||
-r, --recursive recursive download.\n\
|
||||
-l, --level=NUMBER maximum recursion depth (inf or 0 for infinite).\n\
|
||||
--delete-after delete files locally after downloading them.\n\
|
||||
-k, --convert-links convert non-relative links to relative.\n\
|
||||
-K, --backup-converted before converting file X, back up as X.orig.\n\
|
||||
-m, --mirror shortcut option equivalent to -r -N -l inf -nr.\n\
|
||||
-p, --page-requisites get all images, etc. needed to display HTML page.\n\
|
||||
--strict-comments turn on strict (SGML) handling of HTML comments.\n\
|
||||
-r, --recursive recursive download.\n\
|
||||
-l, --level=NUMBER maximum recursion depth (inf or 0 for infinite).\n\
|
||||
--delete-after delete files locally after downloading them.\n\
|
||||
-k, --convert-links convert non-relative links to relative.\n\
|
||||
-K, --backup-converted before converting file X, back up as X.orig.\n\
|
||||
-m, --mirror shortcut option equivalent to -r -N -l inf -nr.\n\
|
||||
-p, --page-requisites get all images, etc. needed to display HTML page.\n\
|
||||
--strict-comments turn on strict (SGML) handling of HTML comments.\n\
|
||||
--preserve-permissions preserve remote file permissions.\n\
|
||||
\n"), stdout);
|
||||
fputs (_("\
|
||||
Recursive accept/reject:\n\
|
||||
|
@ -196,6 +196,9 @@ struct options
|
||||
|
||||
int strict_comments; /* whether strict SGML comments are
|
||||
enforced. */
|
||||
|
||||
int preserve_perm; /* whether remote permissions are used
|
||||
or that what is set by umask. */
|
||||
};
|
||||
|
||||
extern struct options opt;
|
||||
|
Loading…
Reference in New Issue
Block a user