+ if (files_from) {
+ char *colon;
+ if (*argc != 2) {
+ usage(FERROR);
+ exit_cleanup(RERR_SYNTAX);
+ }
+ if (strcmp(files_from, "-") == 0)
+ filesfrom_fd = 0;
+ else if ((colon = find_colon(files_from)) != 0) {
+ if (am_server) {
+ usage(FERROR);
+ exit_cleanup(RERR_SYNTAX);
+ }
+ remote_filesfrom_file = colon+1 + (colon[1] == ':');
+ if (strcmp(remote_filesfrom_file, "-") == 0) {
+ rprintf(FERROR, "Invalid --files-from remote filename\n");
+ exit_cleanup(RERR_SYNTAX);
+ }
+ } else {
+ extern int sanitize_paths;
+ if (sanitize_paths)
+ sanitize_path(strdup(files_from), NULL);
+ filesfrom_fd = open(files_from, O_RDONLY|O_BINARY);
+ if (filesfrom_fd < 0) {
+ rsyserr(FERROR, errno,
+ "failed to open files-from file %s",
+ files_from);
+ exit_cleanup(RERR_FILEIO);
+ }
+ }
+ }
+