]> git.ipfire.org Git - thirdparty/rsync.git/commitdiff
In "ignoring unsafe symlink" messages, show only the file-list path.
authorMatt McCutchen <matt@mattmccutchen.net>
Wed, 17 Mar 2010 04:53:42 +0000 (00:53 -0400)
committerWayne Davison <wayned@samba.org>
Sat, 3 Jul 2010 16:19:01 +0000 (09:19 -0700)
Rsync was showing the full destination path, which was confusing because
nothing is created at that path and was especially bogus in combination
with the source name of a solo file.

http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=506830

backup.c
generator.c

index 7512d921b2f9988204782aaa42b3fd0d96ed7ba1..d9181465d2c43e6bde48b65dbd43d6cbe7b3b900 100644 (file)
--- a/backup.c
+++ b/backup.c
@@ -309,8 +309,8 @@ static int keep_backup(const char *fname)
                const char *sl = F_SYMLINK(file);
                if (safe_symlinks && unsafe_symlink(sl, fname)) {
                        if (verbose) {
-                               rprintf(FINFO, "ignoring unsafe symlink %s -> %s\n",
-                                       full_fname(buf), sl);
+                               rprintf(FINFO, "not backing up unsafe symlink \"%s\" -> \"%s\"\n",
+                                       fname, sl);
                        }
                        kept = 1;
                } else {
index f1fdcdddb4cc9482b09d47a69cccc204091a676b..3467cfa865c6360cbc294cbdc8faa6800ce0eb4a 100644 (file)
@@ -1532,11 +1532,14 @@ static void recv_generator(char *fname, struct file_struct *file, int ndx,
                const char *sl = F_SYMLINK(file);
                if (safe_symlinks && unsafe_symlink(sl, fname)) {
                        if (verbose) {
-                               if (solo_file)
+                               if (solo_file) {
+                                       /* fname contains the destination path, but we
+                                        * want to report the source path. */
                                        fname = f_name(file, NULL);
+                               }
                                rprintf(FINFO,
-                                       "ignoring unsafe symlink %s -> \"%s\"\n",
-                                       full_fname(fname), sl);
+                                       "ignoring unsafe symlink \"%s\" -> \"%s\"\n",
+                                       fname, sl);
                        }
                        return;
                }