diff options
| author | Matt McCutchen <matt@mattmccutchen.net> | 2010-03-17 00:53:42 -0400 |
|---|---|---|
| committer | Wayne Davison <wayned@samba.org> | 2010-07-03 09:19:01 -0700 |
| commit | f532cede11d2d4df575bc7767ea1c7373b0d988b (patch) | |
| tree | 5ead414d3a49f59cd08ff6eda54ddc166fb1fd78 | |
| parent | 05022e00a2cb5ba8b994c1f11ebe501efa2f0114 (diff) | |
| download | android_external_rsync-f532cede11d2d4df575bc7767ea1c7373b0d988b.tar.gz android_external_rsync-f532cede11d2d4df575bc7767ea1c7373b0d988b.tar.bz2 android_external_rsync-f532cede11d2d4df575bc7767ea1c7373b0d988b.zip | |
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
| -rw-r--r-- | backup.c | 4 | ||||
| -rw-r--r-- | generator.c | 9 |
2 files changed, 8 insertions, 5 deletions
@@ -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; } |
