Additional feedback.

This commit is contained in:
Henrik Rydgård committed 2021-05-13 10:39:17 +02:00
1 parent 40ab92fe7b
commit 4d344f556a
7 files changed
+25 -25

No files matched your search

+5 -6
View File
@@ -148,14 +148,14 @@ static std::string RemotePathForRecent(const std::string &filename) {
return "";
}
static std::string LocalFromRemotePath(const std::string &path) {
static Path LocalFromRemotePath(const std::string &path) {
for (const std::string &filename : g_Config.recentIsos) {
std::string basename = RemotePathForRecent(filename);
if (basename == path) {
return filename;
return Path(filename);
}
}
return "";
return Path();
}
static void DiscHandler(const http::Request &request, const Path &filename) {
@@ -229,10 +229,9 @@ static void HandleListing(const http::Request &request) {
static void HandleFallback(const http::Request &request) {
if (serverFlags & (int)WebServerFlags::DISCS) {
std::string filename = LocalFromRemotePath(request.resource());
Path filename = LocalFromRemotePath(request.resource());
if (!filename.empty()) {
// TODO(scoped): Is this right?
DiscHandler(request, Path(filename));
DiscHandler(request, filename);
return;
}
}