Skip to content
Snippets Groups Projects
Commit 9f23232c 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 efa8c523
No related branches found
No related tags found
No related merge requests found
......@@ -317,6 +317,8 @@ bool sbbs_t::menu_exists(const char *code, const char* ext, char* path)
else {
backslash(menu_dir);
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);
if(fexistcase(path))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment