diff options
| -rw-r--r-- | maple/maple.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/maple/maple.cc b/maple/maple.cc index 2fce54d..e6daeda 100644 --- a/maple/maple.cc +++ b/maple/maple.cc @@ -208,8 +208,8 @@ auto main() -> int { response << "20 text/gemini\r\n" << buffer.str(); } else { - if (path.empty() || path == "/") { - std::ifstream file(".maple/gmi/index.gmi"); + if (path.empty() || path.at(path.length() - 1) == '/') { + std::ifstream file(".maple/gmi" + path + "index.gmi"); std::stringstream buffer; buffer << file.rdbuf(); |