Hopefully bugfix

This commit is contained in:
2019-11-20 14:19:55 +01:00
parent 5bc325fa89
commit 961b25d09f

View File

@ -67,7 +67,7 @@ URI::URI(string webroot, string reqpath) {
&& (!fileExists(webroot + relpath + ".php") || (isDirectory(webroot + relpath + ".php") && !fileExists(webroot + relpath + ".php/index.php")))
&& (!fileExists(webroot + relpath + ".html") || (isDirectory(webroot + relpath + ".html") && !fileExists(webroot + relpath + ".html/index.php")))) {
long slash = relpath.find_last_of('/');
if (slash == string::npos) {
if (slash == string::npos || relpath == "/") {
break;
}
info = relpath.substr(slash) + info;