Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/owncloud/client.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarkus Goetz <markus@woboq.com>2013-11-25 22:18:50 +0400
committerMarkus Goetz <markus@woboq.com>2013-11-25 22:25:19 +0400
commit911e0bdd6ebfda4a543b4df96cd7f6a00fcdb8e4 (patch)
treec36d4432881546714f88e3e6364ce4c6bdd24540 /src/mirall
parentfa0f773fcb001ee24067af128bd6cab795db3b9f (diff)
Propagator: Check write errors when downloading
Diffstat (limited to 'src/mirall')
-rw-r--r--src/mirall/owncloudpropagator.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/mirall/owncloudpropagator.cpp b/src/mirall/owncloudpropagator.cpp
index f5da22b02..24e6d0afc 100644
--- a/src/mirall/owncloudpropagator.cpp
+++ b/src/mirall/owncloudpropagator.cpp
@@ -540,7 +540,7 @@ public:
void start();
private:
- QIODevice *_file;
+ QFile *_file;
QScopedPointer<ne_decompress, ScopedPointerHelpers> _decompress;
QString errorString;
QByteArray _expectedEtagForResume;
@@ -557,8 +557,9 @@ private:
if(buf) {
written = that->_file->write(buf, len);
- if( len != written ) {
+ if( len != written || that->_file->error() != QFile::NoError) {
qDebug() << "WRN: content_reader wrote wrong num of bytes:" << len << "," << written;
+ return NE_ERROR;
}
return NE_OK;
}