Add support for comments in the middle of the line in ACL files

This commit is contained in:
Mygod
2016-12-30 01:49:47 -06:00
committed by Max Lv
parent 79c722cded
commit 5f33b73d4e
+4 -5
View File
@@ -396,13 +396,12 @@ init_acl(const char *path)
buf[len - 1] = '\0';
}
char *line = trimwhitespace(buf);
// Skip comments
if (line[0] == '#') {
continue;
char *comment = strchr(buf, '#');
if (comment) {
*comment = '\0';
}
char *line = trimwhitespace(buf);
if (strlen(line) == 0) {
continue;
}