X-Git-Url: https://mattmccutchen.net/rsync/rsync.git/blobdiff_plain/b92693daba3105b797aafb25bbb07ef2df727338..5886edfac2472187a99148df72d413539d353edc:/util.c diff --git a/util.c b/util.c index e18f9919..b78dba84 100644 --- a/util.c +++ b/util.c @@ -704,9 +704,7 @@ unsigned int clean_fname(char *name, BOOL collapse_dot_dot) f += 2; continue; } - *t++ = *f++; - *t++ = *f++; - limit = t; + limit = t + 2; } } while (*f && (*t++ = *f++) != '/') {} @@ -732,8 +730,8 @@ unsigned int clean_fname(char *name, BOOL collapse_dot_dot) * The rootdir string contains a value to use in place of a leading slash. * Specify NULL to get the default of lp_path(module_id). * - * If depth is > 0, it is a count of how many '..'s to allow at the start - * of the path. + * If depth is >= 0, it is a count of how many '..'s to allow at the start + * of the path. Use -1 to allow unlimited depth. * * We also clean the path in a manner similar to clean_fname() but with a * few differences: