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

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