Mercurial > hg > orthanc
comparison Core/SystemToolbox.cpp @ 2503:2717a8872396
fix
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Sat, 24 Mar 2018 12:02:52 +0100 |
parents | 8cc3ca64a534 |
children | 4dcafa8d6633 |
comparison
equal
deleted
inserted
replaced
2502:de6eb6d0d34d | 2503:2717a8872396 |
---|---|
180 void SystemToolbox::ReadFile(std::string& content, | 180 void SystemToolbox::ReadFile(std::string& content, |
181 const std::string& path) | 181 const std::string& path) |
182 { | 182 { |
183 if (!IsRegularFile(path)) | 183 if (!IsRegularFile(path)) |
184 { | 184 { |
185 LOG(ERROR) << std::string("The path does not point to a regular file: ") << path; | 185 LOG(ERROR) << "The path does not point to a regular file: " << path; |
186 throw OrthancException(ErrorCode_RegularFileExpected); | 186 throw OrthancException(ErrorCode_RegularFileExpected); |
187 } | 187 } |
188 | 188 |
189 boost::filesystem::ifstream f; | 189 boost::filesystem::ifstream f; |
190 f.open(path, std::ifstream::in | std::ifstream::binary); | 190 f.open(path, std::ifstream::in | std::ifstream::binary); |
208 const std::string& path, | 208 const std::string& path, |
209 size_t headerSize) | 209 size_t headerSize) |
210 { | 210 { |
211 if (!IsRegularFile(path)) | 211 if (!IsRegularFile(path)) |
212 { | 212 { |
213 LOG(ERROR) << std::string("The path does not point to a regular file: ") << path; | 213 LOG(ERROR) << "The path does not point to a regular file: " << path; |
214 throw OrthancException(ErrorCode_RegularFileExpected); | 214 throw OrthancException(ErrorCode_RegularFileExpected); |
215 } | 215 } |
216 | 216 |
217 boost::filesystem::ifstream f; | 217 boost::filesystem::ifstream f; |
218 f.open(path, std::ifstream::in | std::ifstream::binary); | 218 f.open(path, std::ifstream::in | std::ifstream::binary); |