From 8b74f6dcf0f43d114473858ab85f806258d074a3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20Mr=C3=A1zek?= Date: Mon, 13 Jun 2016 21:56:22 +0200 Subject: NOISSUE reset wroteAnyData flag when resetting FileSink This fixes files getting overwritten with null content when stale cache and redirects are combined --- api/logic/net/FileSink.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/api/logic/net/FileSink.cpp b/api/logic/net/FileSink.cpp index b4c418a5..e912b1c9 100644 --- a/api/logic/net/FileSink.cpp +++ b/api/logic/net/FileSink.cpp @@ -30,6 +30,7 @@ JobStatus FileSink::init(QNetworkRequest& request) qCritical() << "Could not create folder for " + m_filename; return Job_Failed; } + wroteAnyData = false; m_output_file.reset(new QSaveFile(m_filename)); if (!m_output_file->open(QIODevice::WriteOnly)) { -- cgit v1.2.3