aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWayne Davison <wayned@samba.org>2010-07-03 08:23:31 -0700
committerWayne Davison <wayned@samba.org>2010-07-03 08:23:31 -0700
commit8e918e1861c3cf76c60381c7cec70c1803b3c8c4 (patch)
tree45d019d933e3b345d4853c0a6cc8221e9bcdfd74
parent0874fc487246c707afa433140509f6fe9adfc775 (diff)
downloadandroid_external_rsync-8e918e1861c3cf76c60381c7cec70c1803b3c8c4.tar.gz
android_external_rsync-8e918e1861c3cf76c60381c7cec70c1803b3c8c4.tar.bz2
android_external_rsync-8e918e1861c3cf76c60381c7cec70c1803b3c8c4.zip
Make an empty-string dest-dir the same as "." again.
-rw-r--r--main.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/main.c b/main.c
index af9ae078..55915398 100644
--- a/main.c
+++ b/main.c
@@ -508,6 +508,10 @@ static char *get_local_name(struct file_list *flist, char *dest_path)
if (!dest_path || list_only)
return NULL;
+ /* Treat an empty string as a copy into the current directory. */
+ if (!*dest_path)
+ dest_path = ".";
+
if (daemon_filter_list.head) {
char *slash = strrchr(dest_path, '/');
if (slash && (slash[1] == '\0' || (slash[1] == '.' && slash[2] == '\0')))