Mercurial > hg > orthanc
changeset 7204:f27081451c59
fix test of file state in FilesystemHttpSender
| author | Sebastien Jodogne <s.jodogne@gmail.com> |
|---|---|
| date | Mon, 09 Nov 2026 10:02:36 +0100 |
| parents | 49450448d60a |
| children | 52a8e803e7d9 |
| files | OrthancFramework/Sources/HttpServer/FilesystemHttpSender.cpp |
| diffstat | 1 files changed, 2 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/OrthancFramework/Sources/HttpServer/FilesystemHttpSender.cpp Mon Nov 09 09:57:21 2026 +0100 +++ b/OrthancFramework/Sources/HttpServer/FilesystemHttpSender.cpp Mon Nov 09 10:02:36 2026 +0100 @@ -91,7 +91,8 @@ file_.read(&chunk_[0], static_cast<std::streamsize>(chunk_.size())); - if ((file_.flags() & std::istream::failbit) || + if (file_.fail() || + file_.bad() || // Presumably redundant with previous check file_.gcount() < 0) { throw OrthancException(ErrorCode_CorruptedFile);
