HTTP repository: replace an assert.

- Torsten is seeing this on his setup.
This commit is contained in:
James Turner 2016-02-22 21:27:03 +02:00
parent 935d649096
commit d4384422f4

View File

@ -633,7 +633,10 @@ HTTPRepository::failure() const
// dir index data has changed, so write to disk and update // dir index data has changed, so write to disk and update
// the hash accordingly // the hash accordingly
std::ofstream of(pathInRepo().c_str(), std::ios::trunc | std::ios::out); std::ofstream of(pathInRepo().c_str(), std::ios::trunc | std::ios::out);
assert(of.is_open()); if (!of.is_open()) {
throw sg_io_exception("Failed to open directory index file for writing", pathInRepo().c_str());
}
of.write(body.data(), body.size()); of.write(body.data(), body.size());
of.close(); of.close();
directory->dirIndexUpdated(hash); directory->dirIndexUpdated(hash);