Skip to content

Commit af498db

Browse files
committed
Support comments in fs config
Signed-off-by: Jo-Philipp Wich <[email protected]>
1 parent 5bb3a9e commit af498db

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

canned_fs_config.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,10 @@ int load_canned_fs_config(const char* fn) {
5353
}
5454
Path* p = canned_data + canned_used;
5555
p->path = strdup(strtok(line, " \t"));
56+
57+
if (!p->path || !*p->path || *p->path == '#')
58+
continue;
59+
5660
p->uid = atoi(strtok(NULL, " \t"));
5761
p->gid = atoi(strtok(NULL, " \t"));
5862
p->mode = strtol(strtok(NULL, " \t"), NULL, 8); // mode is in octal

0 commit comments

Comments
 (0)