mirror of
https://github.com/shadowsocks/shadowsocks-libev.git
synced 2026-10-22 15:16:58 +00:00
Add support for comments in the middle of the line in ACL files
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user