Mercurial > hg > orthanc
diff Core/HttpServer/FilesystemHttpHandler.cpp @ 1911:7a05144cb919
fix issue #11
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Thu, 28 Jan 2016 17:07:22 +0100 |
parents | b1291df2f780 |
children | aa4b8895cd23 |
line wrap: on
line diff
--- a/Core/HttpServer/FilesystemHttpHandler.cpp Fri Jan 15 17:31:00 2016 +0100 +++ b/Core/HttpServer/FilesystemHttpHandler.cpp Thu Jan 28 17:07:22 2016 +0100 @@ -95,8 +95,10 @@ #endif std::string h = Toolbox::FlattenUri(uri) + "/" + f; - if (fs::is_regular_file(it->status())) + if (Toolbox::IsRegularFile(it->path().string())) + { s += "<li><a href=\"" + h + "\">" + f + "</a></li>"; + } } s += " </ul>"; @@ -156,7 +158,7 @@ p /= uri[i]; } - if (fs::exists(p) && fs::is_regular_file(p)) + if (Toolbox::IsRegularFile(p.string())) { FilesystemHttpSender sender(p); output.Answer(sender); // TODO COMPRESSION