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

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