X-Git-Url: https://wimlib.net/git/?a=blobdiff_plain;f=src%2Fiterate_dir.c;h=cc5c63b89c4b52626c5bea06d24304cf89194b70;hb=5c1b50fdca21aaaddbdb34f5f7beec7d67016984;hp=042c76ac07d030f78d40a4b8c40d18ae13071533;hpb=5d3d469e410dc5f4a28814ad231336fc174cba56;p=wimlib diff --git a/src/iterate_dir.c b/src/iterate_dir.c index 042c76ac..cc5c63b8 100644 --- a/src/iterate_dir.c +++ b/src/iterate_dir.c @@ -242,6 +242,11 @@ wimlib_iterate_dir_tree(WIMStruct *wim, int image, const tchar *_path, tchar *path; int ret; + if (flags & ~(WIMLIB_ITERATE_DIR_TREE_FLAG_RECURSIVE | + WIMLIB_ITERATE_DIR_TREE_FLAG_CHILDREN | + WIMLIB_ITERATE_DIR_TREE_FLAG_RESOURCES_NEEDED)) + return WIMLIB_ERR_INVALID_PARAM; + path = canonicalize_wim_path(_path); if (path == NULL) return WIMLIB_ERR_NOMEM;