X-Git-Url: https://mattmccutchen.net/rsync/rsync.git/blobdiff_plain/3ca8e68f58e7ffeac5b8b969ef26bffc2069f113..122f19a615bdcb84af139ca27ea8735a0908c9d0:/exclude.c diff --git a/exclude.c b/exclude.c index 35fa307a..15dc3109 100644 --- a/exclude.c +++ b/exclude.c @@ -234,7 +234,12 @@ struct exclude_struct **make_exclude_list(char *fname, int l = strlen(line); if (l && line[l-1] == '\n') l--; line[l] = 0; - if (line[0]) add_exclude_list(line,&list,include); + if (line[0] && (line[0] != ';') && (line[0] != '#')) { + /* Skip lines starting with semicolon or pound. + It probably wouldn't cause any harm to not skip + them but there's no need to save them. */ + add_exclude_list(line,&list,include); + } } fclose(f); return list;