PATCH: cosmetic fix to output with --existing -vv

Paul Slootman paul at debian.org
Sun Apr 10 19:22:13 GMT 2005


Currently, rsync --delete -avvn test1/ test2/ --existing 
will give output such as:

not creating new file "newdir"
not creating new file "newdir/newfile"
not creating new file "newdir/subdir"

It would make more sense if it said:

not creating new directory "newdir"
not creating new file "newdir/newfile"
not creating new directory "newdir/subdir"


This following simple patch fixes this.

Paul Slootman

--- generator.c.orig	2005-04-10 21:15:07.000000000 +0200
+++ generator.c	2005-04-10 21:15:08.000000000 +0200
@@ -665,7 +665,8 @@
 	if (only_existing && statret == -1 && stat_errno == ENOENT) {
 		/* we only want to update existing files */
 		if (verbose > 1) {
-			rprintf(FINFO, "not creating new file \"%s\"\n",
+			rprintf(FINFO, "not creating new %s \"%s\"\n",
+                                S_ISDIR(file->mode) ? "directory" : "file",
 				safe_fname(fname));
 		}
 		return;


More information about the rsync mailing list