From 3a1929b83c64d2bd6564f11ea372398a69d9efed Mon Sep 17 00:00:00 2001
From: Rob Swindell <rob@synchro.net>
Date: Mon, 17 Jan 2022 16:28:14 -0800
Subject: [PATCH] Provide more help for the "Access to Sub-directories" feature

This is an experimental feature that's been in the code for quite a while without any supporting help/docs (there was the original commit message, I'm sure). I'm not sure how much value this feature is without providing automatic access to the *files* within the sub-directories, but there you have it.
---
 src/sbbs3/scfg/scfgxfr2.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/src/sbbs3/scfg/scfgxfr2.c b/src/sbbs3/scfg/scfgxfr2.c
index 114867bf74..cf53bc6557 100644
--- a/src/sbbs3/scfg/scfgxfr2.c
+++ b/src/sbbs3/scfg/scfgxfr2.c
@@ -388,7 +388,7 @@ void xfer_cfg()
 			sprintf(opt[j++],"%-27.27s%s","Access Requirements"
 				,cfg.lib[i]->arstr);
 			sprintf(opt[j++],"%-27.27s%s","Access to Sub-directories"
-				,cfg.lib[i]->misc&LIB_DIRS ? "Yes":"No");
+				,cfg.lib[i]->parent_path[0] ? (cfg.lib[i]->misc&LIB_DIRS ? "Yes":"No") : "N/A");
 			sprintf(opt[j++],"%-27.27s%s","Sort Library By Directory", area_sort_desc[cfg.lib[i]->sort]);
 			strcpy(opt[j++],"Clone Options");
 			strcpy(opt[j++],"Export Areas...");
@@ -465,7 +465,19 @@ void xfer_cfg()
 					uifc.helpbuf=
 						"`Access to Sub-directories:`\n"
 						"\n"
+						"When a Library's parent directory has been defined, sub-directories of\n"
+						"that parent directory may be automatically added as directories of the\n"
+						"library when this option is set to `Yes`.\n"
+						"\n"
+						"The directory's names and code suffix are derived from the name of the\n"
+						"sub-directory.\n"
+						"\n"
+						"~ This is an experimental feature. ~"
 					;
+					if(cfg.lib[i]->parent_path[0] == '\0') {
+						uifc.msg("A parent directory must be specified to use this feature");
+						break;
+					}
 					j=uifc.list(WIN_MID|WIN_SAV,0,0,0,&j,0
 						,"Allow Access to Sub-directories of Parent Directory"
 						,uifcYesNoOpts);
-- 
GitLab