From b79f713ed8421d2a7c88021976653035db243098 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andrius=20=C5=A0tikonas?= Date: Mon, 5 Feb 2018 12:46:10 +0000 Subject: [PATCH] Fix ExternalCommandHelper::writeData function. QFile::open needs QIODevice::Append flag. --- src/util/externalcommandhelper.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/util/externalcommandhelper.cpp b/src/util/externalcommandhelper.cpp index 88e0ac5..14bdc44 100644 --- a/src/util/externalcommandhelper.cpp +++ b/src/util/externalcommandhelper.cpp @@ -50,7 +50,7 @@ bool ExternalCommandHelper::readData(QString& sourceDevice, QByteArray& buffer, bool ExternalCommandHelper::writeData(QString &targetDevice, QByteArray& buffer, qint64 offset) { QFile device(targetDevice); - if (!device.open(QFile::WriteOnly | QFile::Unbuffered)) { + if (!device.open(QIODevice::WriteOnly | QIODevice::Append | QIODevice::Unbuffered)) { qCritical() << xi18n("Could not open device %1 for writing.", targetDevice); return false; }