]> git.ipfire.org Git - thirdparty/rsync.git/commitdiff
Make an empty-string dest-dir the same as "." again.
authorWayne Davison <wayned@samba.org>
Sat, 3 Jul 2010 15:23:31 +0000 (08:23 -0700)
committerWayne Davison <wayned@samba.org>
Sat, 3 Jul 2010 15:23:31 +0000 (08:23 -0700)
main.c

diff --git a/main.c b/main.c
index af9ae078bcaa0d4681e3f17e863e28c9dab1d997..55915398a898ccca75b0c5f515dda5d5aee229b3 100644 (file)
--- 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')))