diff options
Diffstat (limited to 'lib/fstree/fstree_from_file.c')
-rw-r--r-- | lib/fstree/fstree_from_file.c | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/lib/fstree/fstree_from_file.c b/lib/fstree/fstree_from_file.c index 3663c1c..d852e0b 100644 --- a/lib/fstree/fstree_from_file.c +++ b/lib/fstree/fstree_from_file.c @@ -297,7 +297,21 @@ static int glob_files(fstree_t *fs, const char *filename, size_t line_num, continue; } - break; + if (extra[0] == '-') { + if (extra[1] == '-' && isspace(extra[2])) { + extra += 2; + while (isspace(*extra)) + ++extra; + break; + } + + fprintf(stderr, "%s: " PRI_SZ ": unknown option.\n", + filename, line_num); + free(ctx.name_pattern); + return -1; + } else { + break; + } } if (*extra == '\0') { |