Browse Source

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

pull/1026/head
Mygod 8 years ago
committed by Max Lv
parent
commit
5f33b73d4e
1 changed files with 4 additions and 5 deletions
  1. 9
      src/acl.c

9
src/acl.c

@ -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;
}

Loading…
Cancel
Save