From 37548e2351ddd7252d540a028b6cd204f6dc22b7 Mon Sep 17 00:00:00 2001 From: Selva Nair Date: Tue, 8 Sep 2020 12:49:30 -0400 Subject: [PATCH] Increase the depth of directories scanned for config files Some users want to use more deeply nested folders than currently supported. Increase the max depth to 20 which should be plenty for all. See also issue: # 364 Signed-off-by: Selva Nair --- openvpn_config.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/openvpn_config.c b/openvpn_config.c index d6e52c1..9bb7722 100644 --- a/openvpn_config.c +++ b/openvpn_config.c @@ -306,7 +306,7 @@ BuildFileList0(const TCHAR *config_dir, int recurse_depth, int group, int flags) FindClose(find_handle); /* optionally loop over each subdir */ - if (recurse_depth <= 1) + if (recurse_depth < 1) return; find_handle = FindFirstFile (find_string, &find_obj); @@ -337,7 +337,7 @@ void BuildFileList() { static bool issue_warnings = true; - int recurse_depth = 4; /* read config_dir and 3 levels of sub-directories */ + int recurse_depth = 20; /* maximum number of levels below config_dir to recurse into */ int flags = 0; int root = 0;