aboutsummaryrefslogtreecommitdiffstats
path: root/sender.c
diff options
context:
space:
mode:
authorWayne Davison <wayned@samba.org>2008-03-30 15:40:34 -0700
committerWayne Davison <wayned@samba.org>2008-03-30 15:44:46 -0700
commit29a89172f77ed76dcf53612e96dc35daf15d7362 (patch)
treecadcb5daf227d3196d1492cc8d8f1a616412b3de /sender.c
parent20893751791a1bb7417b9fa72e91c909619bca6a (diff)
downloadandroid_external_rsync-29a89172f77ed76dcf53612e96dc35daf15d7362.tar.gz
android_external_rsync-29a89172f77ed76dcf53612e96dc35daf15d7362.tar.bz2
android_external_rsync-29a89172f77ed76dcf53612e96dc35daf15d7362.zip
Improved the chdir() code:
- Renamed push_dir() to change_dir() and revised it a little so that it can chdir() to a relative path without an intervening chdir() back to the staring path. - Renamed push_pathname() to change_pathname() and revised it to take different args and to only call path_is_daemon_excluded() on a new path (not a revisit of a file's already-checked path). - Fixed change_pathname() to set the right pathname value when a chdir() call fails. - Set orig_dir once outside of the change_pathname() function. - Got rid of pop_dir().
Diffstat (limited to 'sender.c')
-rw-r--r--sender.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sender.c b/sender.c
index 07887d9b..f7728772 100644
--- a/sender.c
+++ b/sender.c
@@ -135,7 +135,7 @@ void successful_send(int ndx)
}
file = flist->files[ndx - flist->ndx_start];
- if (!push_pathname(F_PATHNAME(file), -1))
+ if (!change_pathname(file, NULL, 0))
return;
f_name(file, fname);
@@ -221,7 +221,7 @@ void send_files(int f_in, int f_out)
} else {
path = slash = "";
}
- if (!push_pathname(F_PATHNAME(file), -1))
+ if (!change_pathname(file, NULL, 0))
continue;
f_name(file, fname);