From 743d078a99c7b51a7ee48d8babf2612f2be93648 Mon Sep 17 00:00:00 2001
From: rswindell <>
Date: Sat, 2 Feb 2019 00:44:08 +0000
Subject: [PATCH] Restore the functionality in menu() lost in rev 1.29 where if
 you pass a full path (sans file suffix/extension), it would use that path for
 the menu file to be displayed.

---
 src/sbbs3/prntfile.cpp | 14 +++++++++-----
 1 file changed, 9 insertions(+), 5 deletions(-)

diff --git a/src/sbbs3/prntfile.cpp b/src/sbbs3/prntfile.cpp
index d0fa16543e..b48ec48e6b 100644
--- a/src/sbbs3/prntfile.cpp
+++ b/src/sbbs3/prntfile.cpp
@@ -242,12 +242,16 @@ bool sbbs_t::menu_exists(const char *code, const char* ext, char* path)
 		return menu_exists(code, "asc", path)
 			|| menu_exists(code, "msg", path);
 
-	backslash(menu_dir);
-	safe_snprintf(path, MAX_PATH, "%smenu/%s%s.%ucol.%s"
-		,cfg.text_dir, menu_dir, code, cols, ext);
+	char prefix[MAX_PATH];
+	if(isfullpath(code))
+		SAFECOPY(prefix, code);
+	else {
+		backslash(menu_dir);
+		SAFEPRINTF3(prefix, "%smenu/%s%s", cfg.text_dir, menu_dir, code);
+	}
+	safe_snprintf(path, MAX_PATH, "%s.%ucol.%s", prefix, cols, ext);
 	if(fexistcase(path))
 		return true;
-	safe_snprintf(path, MAX_PATH, "%smenu/%s%s.%s"
-		,cfg.text_dir, menu_dir, code, ext);
+	safe_snprintf(path, MAX_PATH, "%s.%s", prefix, ext);
 	return fexistcase(path) ? true : false;
 }
-- 
GitLab