Don't upload partial files

This commit is contained in:
Aleric Inglewood
2012-11-14 19:26:16 +01:00
parent b7af32bee3
commit c097d650dc

View File

@@ -159,6 +159,8 @@ class FileInjector : public Injector
#endif
}
}
if (fstream.bad())
throw AICurlNoBody(llformat("An error occured while reading \"%s\".", mFilename.c_str()));
fstream.close();
ostream << std::flush;
llassert(total_len == file_size && total_len == ostream.count_out());