--suffix problem - possibly bug?
Wayne Davison
wayned at samba.org
Wed Apr 7 23:07:24 GMT 2004
On Wed, Apr 07, 2004 at 06:13:31PM -0400, Jim Salter wrote:
> and either way, I wind up with a tilde as a suffix on all the files
> moved into the backup directory at time of synchronization. According
Turns out to be a problem caused by the fact that a daemon goes through
the option-parsing code twice -- once when it first starts (and figures
out that it is a daemon), and again when it is parsing the options sent
from the connecting client. Since a client doesn't bother to send the
--suffix option if it is specifying a default value, the daemon server
ends up with the wrong default -- the one it decided on the first time
through the option-parsing code. This will be fixed in 2.6.1 (patch
appended).
Thanks for the report!
..wayne..
-------------- next part --------------
--- options.c 31 Mar 2004 17:02:22 -0000 1.143
+++ options.c 7 Apr 2004 23:04:48 -0000
@@ -688,6 +688,12 @@ int parse_arguments(int *argc, const cha
files_from = alloc_sanitize_path(files_from, curr_dir);
}
+ if (daemon_opt) {
+ daemon_opt = 0;
+ am_daemon = 1;
+ return 1;
+ }
+
if (!backup_suffix)
backup_suffix = backup_dir ? "" : BACKUP_SUFFIX;
backup_suffix_len = strlen(backup_suffix);
@@ -749,9 +755,6 @@ int parse_arguments(int *argc, const cha
}
}
}
-
- if (daemon_opt)
- am_daemon = 1;
return 1;
}
More information about the rsync
mailing list