From c097d650dcf5cae041d4ec3aa43ea3fa16ebe58e Mon Sep 17 00:00:00 2001 From: Aleric Inglewood Date: Wed, 14 Nov 2012 19:26:16 +0100 Subject: [PATCH] Don't upload partial files --- indra/llmessage/llhttpclient.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/indra/llmessage/llhttpclient.cpp b/indra/llmessage/llhttpclient.cpp index 61a5cc50f..b7871556e 100644 --- a/indra/llmessage/llhttpclient.cpp +++ b/indra/llmessage/llhttpclient.cpp @@ -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());