mirror of
https://github.com/amadvance/snapraid.git
synced 2026-11-29 03:16:59 -05:00
Reject standalone absolute directory filter pattern /**/ during parsing
This commit is contained in:
parent
9e5f51fa5b
commit
d4dc5a7339
5 changed files with 46 additions and 2 deletions
|
|
@ -45,8 +45,8 @@ struct snapraid_filter* filter_alloc_file(int direction, const char* root, const
|
|||
pathimport(filter->root, sizeof(filter->root), root);
|
||||
filter->direction = direction;
|
||||
|
||||
/* reject the root directory as an invalid pattern */
|
||||
if (pathcmp(filter->pattern, "/") == 0) {
|
||||
/* reject the root directory and standalone absolute directory wildcard as invalid patterns */
|
||||
if (pathcmp(filter->pattern, "/") == 0 || pathcmp(filter->pattern, "/**/") == 0) {
|
||||
free(filter);
|
||||
return 0;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue