X-Git-Url: https://mattmccutchen.net/rsync/rsync.git/blobdiff_plain/557a35f55bf4cb99f5cce1d966598e11c03318cc..bdedced84b7f446f818efd4d25b8985285a50009:/flist.c diff --git a/flist.c b/flist.c index b3c966ed..ad02b898 100644 --- a/flist.c +++ b/flist.c @@ -1127,6 +1127,14 @@ struct file_list *send_file_list(int f, int argc, char *argv[]) fname[l] = '\0'; } is_dot_dir = 1; + } else if (l > 1 && fname[l-1] == '.' && fname[l-2] == '.' + && (l == 2 || fname[l-3] == '/')) { + if (l + 2 >= MAXPATHLEN) + overflow("send_file_list"); + fname[l++] = '/'; + fname[l++] = '.'; + fname[l] = '\0'; + is_dot_dir = 1; } else { is_dot_dir = fname[l-1] == '.' && (l == 1 || fname[l-2] == '/');