Bug 12569 - Missing directory errors not ignored
Missing directory errors not ignored
Status: NEW
Product: rsync
Classification: Unclassified
Component: core
All Linux
: P5 normal
: ---
Assigned To: Wayne Davison
Rsync QA Contact
Depends on:
  Show dependency treegraph
Reported: 2017-02-07 11:31 UTC by Axel Kittenberger
Modified: 2017-02-07 11:31 UTC (History)
0 users

See Also:


Note You need to log in before you can comment on or make changes to this bug.
Description Axel Kittenberger 2017-02-07 11:31:43 UTC
When using --delete-missing-args and --ignore-errors with a a file list it terminates anyway if one directory, that is not a sub of root, is not existing.


~$ mkdir -p src/a trg/a
~$ echo "/a/b/c" > list
~$ /usr/local/bin/rsync -slt --ignore-errors --force --ignore-missing-args --delete-missing-args --files-from=list --rsync-path=/usr/local/bin/rsync src localhost:`pwd`/trg
file has vanished: "/home/axel/src/a/b"
ABORTING due to invalid path from sender: a/b/c
rsync error: protocol incompatibility (code 2) at generator.c(1270) [generator=3.1.2]
~$ /usr/local/bin/rsync --version
rsync  version 3.1.2  protocol version 31
Copyright (C) 1996-2015 by Andrew Tridgell, Wayne Davison, and others.
Web site: http://rsync.samba.org/
    64-bit files, 64-bit inums, 64-bit timestamps, 64-bit long ints,
    socketpairs, hardlinks, symlinks, IPv6, batchfiles, inplace,
    append, no ACLs, xattrs, iconv, symtimes, prealloc

rsync comes with ABSOLUTELY NO WARRANTY.  This is free software, and you
are welcome to redistribute it under certain conditions.  See the GNU
General Public Licence for details.

Following patch fixes it for me, albeit it ignores this kind of error now always:
--- rsync-3.1.2-org/generator.c	2015-12-05 20:10:24.000000000 +0100
+++ rsync-3.1.2/generator.c	2017-02-07 10:58:33.768453242 +0100
@@ -1264,10 +1264,11 @@
 			 && (*dn != '.' || dn[1]) /* Avoid an issue with --relative and the "." dir. */
 			 && (prior_dir_file && strcmp(dn, f_name(prior_dir_file, NULL)) != 0)
 			 && flist_find_name(cur_flist, dn, 1) < 0) {
+				io_error |= IOERR_VANISHED;
-					"ABORTING due to invalid path from sender: %s/%s\n",
+					"WARNING: invalid path from sender: %s/%s\n",
 					dn, file->basename);
-				exit_cleanup(RERR_PROTOCOL);
+				return;
 			if (relative_paths && !implied_dirs
 			 && do_stat(dn, &sx.st) < 0) {

Now the exit code is 24, partial transfer, as would be expected.