From e5ce3bcf2c4d26d70c245a4f3a4a87da2b254321 Mon Sep 17 00:00:00 2001 From: Wayne Davison Date: Wed, 9 Jun 2004 19:23:56 +0000 Subject: [PATCH] Needed to enclose the new symlink-warning code in an "#if SUPPORT_LINKS" conditional. --- flist.c | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/flist.c b/flist.c index 65b5825b..0bb14449 100644 --- a/flist.c +++ b/flist.c @@ -92,7 +92,7 @@ static int show_filelist_p(void) static void start_filelist_progress(char *kind) { rprintf(FINFO, "%s ... ", kind); - if ((verbose > 1) || do_progress) + if (verbose > 1 || do_progress) rprintf(FINFO, "\n"); rflush(FINFO); } @@ -106,7 +106,7 @@ static void emit_filelist_progress(const struct file_list *flist) static void maybe_emit_filelist_progress(const struct file_list *flist) { - if (do_progress && show_filelist_p() && ((flist->count % 100) == 0)) + if (do_progress && show_filelist_p() && (flist->count % 100) == 0) emit_filelist_progress(flist); } @@ -131,9 +131,10 @@ static void list_file_entry(struct file_struct *f) { char perms[11]; - if (!f->basename) + if (!f->basename) { /* this can happen if duplicate names were removed */ return; + } permstring(perms, f->mode); @@ -145,10 +146,12 @@ static void list_file_entry(struct file_struct *f) f_name(f), f->u.link); } else #endif + { rprintf(FINFO, "%s %11.0f %s %s\n", perms, (double)f->length, timestring(f->modtime), f_name(f)); + } } @@ -762,13 +765,16 @@ struct file_struct *make_file(char *fname, && check_exclude_file(thisname, 0, exclude_level)) return NULL; if (save_errno == ENOENT) { +#if SUPPORT_LINKS /* Avoid "vanished" error if symlink points nowhere. */ if (copy_links && do_lstat(thisname, &st) == 0 && S_ISLNK(st.st_mode)) { io_error |= IOERR_GENERAL; rprintf(FERROR, "symlink has no referent: %s\n", full_fname(thisname)); - } else { + } else +#endif + { enum logcode c = am_daemon && protocol_version < 28 ? FERROR : FINFO; io_error |= IOERR_VANISHED; -- 2.34.1