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

Look in mods dir for FileIndexScript before the exec dir

... unless the full path was specified.
parent 722dabfb
No related branches found
No related tags found
No related merge requests found
Pipeline #5050 passed
...@@ -3255,9 +3255,11 @@ static enum get_fullpath get_fullpath(http_session_t * session) ...@@ -3255,9 +3255,11 @@ static enum get_fullpath get_fullpath(http_session_t * session)
case PARSED_VPATH_FULL: case PARSED_VPATH_FULL:
return FULLPATH_VALID; return FULLPATH_VALID;
default: default:
if(getfname(startup->file_index_script) == startup->file_index_script) // no path specified if(getfname(startup->file_index_script) == startup->file_index_script) { // no path specified
SAFEPRINTF2(str, "%s%s", scfg.mods_dir, startup->file_index_script);
if(!scfg.mods_dir[0] || !fexist(str))
SAFEPRINTF2(str, "%s%s", scfg.exec_dir, startup->file_index_script); SAFEPRINTF2(str, "%s%s", scfg.exec_dir, startup->file_index_script);
else } else
SAFECOPY(str, startup->file_index_script); SAFECOPY(str, startup->file_index_script);
break; break;
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment