]> sjero.net Git - wget/commitdiff
Document missing options and fix --preserve-permissions
authorTomas Hozza <thozza@redhat.com>
Thu, 11 Jul 2013 15:52:28 +0000 (17:52 +0200)
committerGiuseppe Scrivano <gscrivano@gnu.org>
Thu, 11 Jul 2013 20:01:43 +0000 (22:01 +0200)
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 <thozza@redhat.com>
doc/ChangeLog
doc/wget.texi
src/ChangeLog
src/ftp.c

index 1a70e3cdeffd524dcfbeee933002ecaff4ecf0ab..2b8d070134ffe2cb10bb56f66922ae94e9dcf05b 100644 (file)
@@ -1,3 +1,7 @@
+2013-07-11  Tomas Hozza  <thozza@redhat.com>
+
+       * wget.texi: Document --regex-type and --preserve-permissions.
+
 2013-06-17  Dave Reisner  <dreisner@archlinux.org> (tiny change)
 
        * texi2pod.pl: Fix formatting error that causes build to fail with
 2013-06-17  Dave Reisner  <dreisner@archlinux.org> (tiny change)
 
        * texi2pod.pl: Fix formatting error that causes build to fail with
index 710f0ac41716f43f1bb16bcff385ab67273f7059..5054382ddf104cd2ccb31760403be6437150e573 100644 (file)
@@ -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.
 
 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.
 
+@cindex file permissions
+@item --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
 @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.
 
 @itemx --reject-regex @var{urlregex}
 Specify a regular expression to accept or reject the complete URL.
 
+@item --regex-type @var{regextype}
+Specify the regular expression type.  Possible types are @samp{posix} or
+@samp{pcre}.  Note that to be able to use @samp{pcre} type, wget has to be
+compiled with libpcre support.
+
 @item -D @var{domain-list}
 @itemx --domains=@var{domain-list}
 Set domains to be followed.  @var{domain-list} is a comma-separated list
 @item -D @var{domain-list}
 @itemx --domains=@var{domain-list}
 Set domains to be followed.  @var{domain-list} is a comma-separated list
index d5040115744996bdd1d0e362adeb7788253c9674..186b33d4723b56afcb3a4a86ace58fad4bf8bd1a 100644 (file)
@@ -1,9 +1,14 @@
+2013-07-11  Tomas Hozza  <thozza@redhat.com>
+
+       * ftp.c (ftp_loop): Use ftp_retrieve_glob() also in case
+       --preserve-permissions was specified.
+
 2013-03-20  Tomas Hozza  <thozza@redhat.com>
 
        * http.c (gethttp): Set "sock" to -1 if it's not and we have no
        persistent connection
 
 2013-03-20  Tomas Hozza  <thozza@redhat.com>
 
        * http.c (gethttp): Set "sock" to -1 if it's not and we have no
        persistent connection
 
-2013-04-26  Tomas Hozza  <thozza@redhat.com>
+2013-04-26  Tomas Hozza  <thozza@redhat.com> (tiny change)
 
        * log.c (redirect_output): Use DEFAULT_LOGFILE in diagnostic message
        when `logfile' is NULL.
 
        * log.c (redirect_output): Use DEFAULT_LOGFILE in diagnostic message
        when `logfile' is NULL.
index 9b3d81c85f3cfdb11ca7fefd2d14ec6459a24f6b..1fe2bac77cd7ef92e85a05a4eb15db70383fca9c 100644 (file)
--- 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);
         }
             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
         {
           /* 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);
         }
           res = ftp_retrieve_glob (u, &con,
                                    ispattern ? GLOB_GLOBALL : GLOB_GETONE);
         }