From: Matt McCutchen Date: Wed, 17 Mar 2010 04:53:42 +0000 (-0400) Subject: In "ignoring unsafe symlink" messages, show only the file-list path. X-Git-Tag: v3.0.8pre1~54 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f532cede11d2d4df575bc7767ea1c7373b0d988b;p=thirdparty%2Frsync.git In "ignoring unsafe symlink" messages, show only the file-list path. 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 --- diff --git a/backup.c b/backup.c index 7512d921..d9181465 100644 --- 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 { diff --git a/generator.c b/generator.c index f1fdcddd..3467cfa8 100644 --- a/generator.c +++ b/generator.c @@ -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; }