Skip to content
Snippets Groups Projects
Commit a5b344c9 authored by Rob Swindell's avatar Rob Swindell :speech_balloon:
Browse files

Convert menu paths (e.g. /sbbs/text/menu/../filename) to full paths

If text/menu is a symlink (on *nix), then the path above would actually
point to a filename in the parent of the symlink target, which is not
what we want (we want the filename in the text dir). Fixed by using
FULLPATH.
parent 22faceee
No related branches found
No related tags found
1 merge request!463MRC mods by Codefenix (2024-10-20)
...@@ -317,6 +317,8 @@ bool sbbs_t::menu_exists(const char *code, const char* ext, char* path) ...@@ -317,6 +317,8 @@ bool sbbs_t::menu_exists(const char *code, const char* ext, char* path)
else { else {
backslash(menu_dir); backslash(menu_dir);
SAFEPRINTF3(prefix, "%smenu/%s%s", cfg.text_dir, menu_dir, code); SAFEPRINTF3(prefix, "%smenu/%s%s", cfg.text_dir, menu_dir, code);
FULLPATH(path, prefix, MAX_PATH);
SAFECOPY(prefix, path);
} }
safe_snprintf(path, MAX_PATH, "%s.%lucol.%s", prefix, cols, ext); safe_snprintf(path, MAX_PATH, "%s.%lucol.%s", prefix, cols, ext);
if(fexistcase(path)) if(fexistcase(path))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment