Matt McCutchen's Web Site
/
rsync
/
rsync.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
cosmetic fix.
[rsync/rsync.git]
/
main.c
diff --git
a/main.c
b/main.c
index
4cf4cf6
..
fa4fe0f
100644
(file)
--- a/
main.c
+++ b/
main.c
@@
-49,7
+49,6
@@
static void report(int f)
write_longint(f,read_total());
write_longint(f,write_total());
write_longint(f,total_size);
write_longint(f,read_total());
write_longint(f,write_total());
write_longint(f,total_size);
- write_flush(f);
return;
}
return;
}
@@
-150,8
+149,8
@@
static char *get_local_name(struct file_list *flist,char *name)
if (do_stat(name,&st) == 0) {
if (S_ISDIR(st.st_mode)) {
if (do_stat(name,&st) == 0) {
if (S_ISDIR(st.st_mode)) {
- if (
chdir(name) != 0
) {
- rprintf(FERROR,"
ch
dir %s : %s (1)\n",
+ if (
!push_dir(name, 0)
) {
+ rprintf(FERROR,"
push_
dir %s : %s (1)\n",
name,strerror(errno));
exit_cleanup(1);
}
name,strerror(errno));
exit_cleanup(1);
}
@@
-177,8
+176,9
@@
static char *get_local_name(struct file_list *flist,char *name)
rprintf(FINFO,"created directory %s\n",name);
}
rprintf(FINFO,"created directory %s\n",name);
}
- if (chdir(name) != 0) {
- rprintf(FERROR,"chdir %s : %s (2)\n",name,strerror(errno));
+ if (!push_dir(name, 0)) {
+ rprintf(FERROR,"push_dir %s : %s (2)\n",
+ name,strerror(errno));
exit_cleanup(1);
}
exit_cleanup(1);
}
@@
-199,8
+199,8
@@
static void do_server_sender(int f_in, int f_out, int argc,char *argv[])
if (verbose > 2)
rprintf(FINFO,"server_sender starting pid=%d\n",(int)getpid());
if (verbose > 2)
rprintf(FINFO,"server_sender starting pid=%d\n",(int)getpid());
- if (!relative_paths &&
chdir(dir) != 0
) {
- rprintf(FERROR,"
ch
dir %s: %s (3)\n",dir,strerror(errno));
+ if (!relative_paths &&
!push_dir(dir, 0)
) {
+ rprintf(FERROR,"
push_
dir %s: %s (3)\n",dir,strerror(errno));
exit_cleanup(1);
}
argc--;
exit_cleanup(1);
}
argc--;
@@
-290,8
+290,8
@@
static void do_server_recv(int f_in, int f_out, int argc,char *argv[])
dir = argv[0];
argc--;
argv++;
dir = argv[0];
argc--;
argv++;
- if (!am_daemon &&
chdir(dir) != 0
) {
- rprintf(FERROR,"
ch
dir %s : %s (4)\n",
+ if (!am_daemon &&
!push_dir(dir, 0)
) {
+ rprintf(FERROR,"
push_
dir %s : %s (4)\n",
dir,strerror(errno));
exit_cleanup(1);
}
dir,strerror(errno));
exit_cleanup(1);
}