if (do_stat(name,&st) == 0) {
if (S_ISDIR(st.st_mode)) {
if (do_stat(name,&st) == 0) {
if (S_ISDIR(st.st_mode)) {
rprintf(FERROR, "push_dir %s failed: %s (1)\n",
full_fname(name), strerror(errno));
exit_cleanup(RERR_FILESELECT);
rprintf(FERROR, "push_dir %s failed: %s (1)\n",
full_fname(name), strerror(errno));
exit_cleanup(RERR_FILESELECT);
rprintf(FERROR, "push_dir %s failed: %s (2)\n",
full_fname(name), strerror(errno));
exit_cleanup(RERR_FILESELECT);
rprintf(FERROR, "push_dir %s failed: %s (2)\n",
full_fname(name), strerror(errno));
exit_cleanup(RERR_FILESELECT);
rprintf(FERROR, "push_dir %s failed: %s (3)\n",
full_fname(dir), strerror(errno));
exit_cleanup(RERR_FILESELECT);
rprintf(FERROR, "push_dir %s failed: %s (3)\n",
full_fname(dir), strerror(errno));
exit_cleanup(RERR_FILESELECT);
rprintf(FERROR, "push_dir %s failed: %s (4)\n",
full_fname(dir), strerror(errno));
exit_cleanup(RERR_FILESELECT);
rprintf(FERROR, "push_dir %s failed: %s (4)\n",
full_fname(dir), strerror(errno));
exit_cleanup(RERR_FILESELECT);
send_files(flist,f_out,f_in);
io_flush(FULL_FLUSH);
if (protocol_version >= 24) {
send_files(flist,f_out,f_in);
io_flush(FULL_FLUSH);
if (protocol_version >= 24) {
* (implemented by forking "pwd" and reading its output) doesn't
* work when there are other child processes. Also, on all systems
* that implement getcwd that way "pwd" can't be found after chroot. */
* (implemented by forking "pwd" and reading its output) doesn't
* work when there are other child processes. Also, on all systems
* that implement getcwd that way "pwd" can't be found after chroot. */
if (write_batch && !am_server) {
write_batch_argvs_file(orig_argc, orig_argv);
if (write_batch && !am_server) {
write_batch_argvs_file(orig_argc, orig_argv);