Fix ExternalCommandHelper::writeData function.
QFile::open needs QIODevice::Append flag.
This commit is contained in:
parent
af6c345210
commit
b79f713ed8
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue