Introduce Path, start using it all over the place.
Still lots left to convert! Convert GetSysDirectory to return Path. More buildfixing Remove unnecessary Path( constructors
This commit is contained in:
parent
2987b8c17a
commit
025bcb1673
123 changed files with 1321 additions and 949 deletions
|
@ -158,8 +158,8 @@ static std::string LocalFromRemotePath(const std::string &path) {
|
|||
return "";
|
||||
}
|
||||
|
||||
static void DiscHandler(const http::Request &request, const std::string &filename) {
|
||||
s64 sz = File::GetFileSize(filename);
|
||||
static void DiscHandler(const http::Request &request, const Path &filename) {
|
||||
s64 sz = File::GetFileSize(filename.ToString());
|
||||
|
||||
std::string range;
|
||||
if (request.Method() == http::RequestHeader::HEAD) {
|
||||
|
@ -231,7 +231,8 @@ static void HandleFallback(const http::Request &request) {
|
|||
if (serverFlags & (int)WebServerFlags::DISCS) {
|
||||
std::string filename = LocalFromRemotePath(request.resource());
|
||||
if (!filename.empty()) {
|
||||
DiscHandler(request, filename);
|
||||
// TODO(scoped): Is this right?
|
||||
DiscHandler(request, Path(filename));
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue