From: Wayne Davison Date: Sat, 3 Jul 2010 15:23:31 +0000 (-0700) Subject: Make an empty-string dest-dir the same as "." again. X-Git-Tag: v3.0.8pre1~68 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8e918e1861c3cf76c60381c7cec70c1803b3c8c4;p=thirdparty%2Frsync.git Make an empty-string dest-dir the same as "." again. --- 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')))