extern int protocol_version;
extern int file_total;
extern int recurse;
+extern int xfer_dirs;
extern int protect_args;
extern int relative_paths;
extern int sanitize_paths;
*f_out_p = from_gen_pipe[1];
*f_in_p = batch_fd;
ret = -1; /* no child pid */
+#ifdef ICONV_CONST
+ setup_iconv();
+#endif
} else if (local_server) {
/* If the user didn't request --[no-]whole-file, force
* it on, but only if we're not batch processing. */
if (whole_file < 0 && !write_batch)
whole_file = 1;
ret = local_child(argc, args, f_in_p, f_out_p, child_main);
+#ifdef ICONV_CONST
+ setup_iconv();
+#endif
} else {
+#ifdef ICONV_CONST
+ setup_iconv();
+#endif
if (protect_args) {
int fd;
#ifdef ICONV_OPTION
io_start_multiplex_out();
}
- if (argc == 0)
+ if (argc == 0) {
list_only |= 1;
+ xfer_dirs |= 1;
+ }
send_filter_list(read_batch ? -1 : f_out);
static char *dotarg[1] = { "." };
p = dotarg[0];
remote_argv = dotarg;
- list_only = 1;
+ list_only |= 1;
+ xfer_dirs |= 1;
}
remote_argc = 1;
}
remote_argv[i] = arg;
}
- if (argc == 0)
+ if (argc == 0) {
list_only |= 1;
+ xfer_dirs |= 1;
+ }
}
if (daemon_over_rsh < 0)
if (write_batch < 0)
dry_run = 1;
- if (am_daemon && !am_server)
+ if (am_server) {
+#ifdef ICONV_CONST
+ setup_iconv();
+#endif
+ } else if (am_daemon)
return daemon_main();
if (am_server && protect_args) {