From d5133f6e8f19fad36d711c8b592608cac2b92c53 Mon Sep 17 00:00:00 2001 From: Tomas Hozza Date: Thu, 11 Jul 2013 17:52:28 +0200 Subject: [PATCH] Document missing options and fix --preserve-permissions Added documentation for --regex-type and --preserve-permissions options. Fixed --preserve-permissions to work properly also if downloading a single file from FTP. Signed-off-by: Tomas Hozza --- doc/ChangeLog | 4 ++++ doc/wget.texi | 9 +++++++++ src/ChangeLog | 5 +++++ src/ftp.c | 6 +++--- 4 files changed, 21 insertions(+), 3 deletions(-) diff --git a/doc/ChangeLog b/doc/ChangeLog index 1a70e3c..5e8fece 100644 --- a/doc/ChangeLog +++ b/doc/ChangeLog @@ -1,3 +1,7 @@ +2013-07-11 Tomas Hozza + + * wget.texi: Document --regex-type and --preserve-permissions + 2013-06-17 Dave Reisner (tiny change) * texi2pod.pl: Fix formatting error that causes build to fail with diff --git a/doc/wget.texi b/doc/wget.texi index 710f0ac..285e4b7 100644 --- a/doc/wget.texi +++ b/doc/wget.texi @@ -1816,6 +1816,10 @@ in some rare firewall configurations, active FTP actually works when passive FTP doesn't. If you suspect this to be the case, use this option, or set @code{passive_ftp=off} in your init file. address@hidden file permissions address@hidden --preserve-permissions +Preserve remote file permissions instead of permissions set by umask. + @cindex symbolic links, retrieving @item --retr-symlinks Usually, when retrieving @sc{ftp} directories recursively and a symbolic @@ -2057,6 +2061,11 @@ it will be treated as a pattern, rather than a suffix. @itemx --reject-regex @var{urlregex} Specify a regular expression to accept or reject the complete URL. address@hidden --regex-type @var{regextype} +Specify the regular expression type. Possible types are @samp{posix} or address@hidden Note that to be able to use @samp{pcre} type, wget has to be +compiled with libpcre support. + @item -D @var{domain-list} @itemx address@hidden Set domains to be followed. @var{domain-list} is a comma-separated list diff --git a/src/ChangeLog b/src/ChangeLog index 5b978eb..20e10c2 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2013-07-11 Tomas Hozza + + * ftp.c (ftp_loop): Use ftp_retrieve_glob() also in case + --preserve-permissions was specified. + 2013-04-26 Tomas Hozza (tiny change) * log.c (redirect_output): Use DEFAULT_LOGFILE in diagnostic message diff --git a/src/ftp.c b/src/ftp.c index 9b3d81c..4954258 100644 --- a/src/ftp.c +++ b/src/ftp.c @@ -2285,11 +2285,11 @@ ftp_loop (struct url *u, char **local_file, int *dt, struct url *proxy, file_part = u->path; ispattern = has_wildcards_p (file_part); } - if (ispattern || recursive || opt.timestamping) + if (ispattern || recursive || opt.timestamping || opt.preserve_perm) { /* ftp_retrieve_glob is a catch-all function that gets called - if we need globbing, time-stamping or recursion. Its - third argument is just what we really need. */ + if we need globbing, time-stamping, recursion or preserve + permissions. Its third argument is just what we really need. */ res = ftp_retrieve_glob (u, &con, ispattern ? GLOB_GLOBALL : GLOB_GETONE); } -- 1.8.3.1