X-Git-Url: https://mattmccutchen.net/rsync/rsync.git/blobdiff_plain/95dd949c09474942fe580af221298f6eb2176d87..b45b059a3dcfcf835a8925c23240a3a49311ca44:/exclude.c diff --git a/exclude.c b/exclude.c index 693babb6..e1b25886 100644 --- a/exclude.c +++ b/exclude.c @@ -241,7 +241,7 @@ struct exclude_struct **make_exclude_list(const char *fname, while (fgets(line,MAXPATHLEN,f)) { int l = strlen(line); - if (l && line[l-1] == '\n') l--; + while (l && (line[l-1] == '\n' || line[l-1] == '\r')) l--; line[l] = 0; if (line[0] && (line[0] != ';') && (line[0] != '#')) { /* Skip lines starting with semicolon or pound.