diff --git a/src/lib/adblock/adblockmanager.cpp b/src/lib/adblock/adblockmanager.cpp index 8bc4ff0ea..df3a9e575 100644 --- a/src/lib/adblock/adblockmanager.cpp +++ b/src/lib/adblock/adblockmanager.cpp @@ -202,7 +202,7 @@ AdBlockSubscription* AdBlockManager::addSubscription(const QString &title, const QByteArray data = QString("Title: %1\nUrl: %2\n[Adblock Plus 1.1.1]").arg(title, url).toLatin1(); QSaveFile file(filePath); - if (!file.open(QFile::WriteOnly | QFile::Truncate)) { + if (!file.open(QFile::WriteOnly)) { qWarning() << "AdBlockManager: Cannot write to file" << filePath; return 0; } diff --git a/src/lib/adblock/adblocksubscription.cpp b/src/lib/adblock/adblocksubscription.cpp index ea71d0554..b4b964fb0 100644 --- a/src/lib/adblock/adblocksubscription.cpp +++ b/src/lib/adblock/adblocksubscription.cpp @@ -182,7 +182,7 @@ bool AdBlockSubscription::saveDownloadedData(const QByteArray &data) { QSaveFile file(m_filePath); - if (!file.open(QFile::ReadWrite | QFile::Truncate)) { + if (!file.open(QFile::WriteOnly)) { qWarning() << "AdBlockSubscription::" << __FUNCTION__ << "Unable to open adblock file for writing:" << m_filePath; return false; }