Fix ExternalCommandHelper::writeData function.

QFile::open needs QIODevice::Append flag.
This commit is contained in:
Andrius Štikonas 2018-02-05 12:46:10 +00:00
parent af6c345210
commit b79f713ed8
1 changed files with 1 additions and 1 deletions

View File

@ -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 <filename>%1</filename> for writing.", targetDevice);
return false;
}