Blame SOURCES/wget-1.14-doc-missing-opts-and-fix-preserve-permissions.patch

bc22e6
From c78caecbb4209ce2e36a587497cf1d6b350e513a Mon Sep 17 00:00:00 2001
bc22e6
From: Tomas Hozza <thozza@redhat.com>
bc22e6
Date: Thu, 11 Jul 2013 15:52:28 +0000
bc22e6
Subject: Document missing options and fix --preserve-permissions
bc22e6
bc22e6
Added documentation for --regex-type and --preserve-permissions
bc22e6
options.
bc22e6
bc22e6
Fixed --preserve-permissions to work properly also if downloading a
bc22e6
single file from FTP.
bc22e6
bc22e6
Signed-off-by: Tomas Hozza <thozza@redhat.com>
bc22e6
---
bc22e6
diff --git a/doc/wget.texi b/doc/wget.texi
bc22e6
index 710f0ac..5054382 100644
bc22e6
--- a/doc/wget.texi
bc22e6
+++ b/doc/wget.texi
bc22e6
@@ -1816,6 +1816,10 @@ in some rare firewall configurations, active FTP actually works when
bc22e6
 passive FTP doesn't.  If you suspect this to be the case, use this
bc22e6
 option, or set @code{passive_ftp=off} in your init file.
bc22e6
 
bc22e6
+@cindex file permissions
bc22e6
+@item --preserve-permissions
bc22e6
+Preserve remote file permissions instead of permissions set by umask.
bc22e6
+
bc22e6
 @cindex symbolic links, retrieving
bc22e6
 @item --retr-symlinks
bc22e6
 Usually, when retrieving @sc{ftp} directories recursively and a symbolic
bc22e6
@@ -2057,6 +2061,11 @@ it will be treated as a pattern, rather than a suffix.
bc22e6
 @itemx --reject-regex @var{urlregex}
bc22e6
 Specify a regular expression to accept or reject the complete URL.
bc22e6
 
bc22e6
+@item --regex-type @var{regextype}
bc22e6
+Specify the regular expression type.  Possible types are @samp{posix} or
bc22e6
+@samp{pcre}.  Note that to be able to use @samp{pcre} type, wget has to be
bc22e6
+compiled with libpcre support.
bc22e6
+
bc22e6
 @item -D @var{domain-list}
bc22e6
 @itemx --domains=@var{domain-list}
bc22e6
 Set domains to be followed.  @var{domain-list} is a comma-separated list
bc22e6
diff --git a/src/ftp.c b/src/ftp.c
bc22e6
index 9b3d81c..1fe2bac 100644
bc22e6
--- a/src/ftp.c
bc22e6
+++ b/src/ftp.c
bc22e6
@@ -2285,11 +2285,11 @@ ftp_loop (struct url *u, char **local_file, int *dt, struct url *proxy,
bc22e6
             file_part = u->path;
bc22e6
           ispattern = has_wildcards_p (file_part);
bc22e6
         }
bc22e6
-      if (ispattern || recursive || opt.timestamping)
bc22e6
+      if (ispattern || recursive || opt.timestamping || opt.preserve_perm)
bc22e6
         {
bc22e6
           /* ftp_retrieve_glob is a catch-all function that gets called
bc22e6
-             if we need globbing, time-stamping or recursion.  Its
bc22e6
-             third argument is just what we really need.  */
bc22e6
+             if we need globbing, time-stamping, recursion or preserve
bc22e6
+             permissions.  Its third argument is just what we really need.  */
bc22e6
           res = ftp_retrieve_glob (u, &con,
bc22e6
                                    ispattern ? GLOB_GLOBALL : GLOB_GETONE);
bc22e6
         }
bc22e6
--
bc22e6
cgit v0.9.0.2