mirror of
https://github.com/PrismLauncher/PrismLauncher.git
synced 2025-06-13 05:37:42 +02:00
@ -54,7 +54,7 @@ Task::State FileSink::init(QNetworkRequest& request)
|
||||
return Task::State::Failed;
|
||||
}
|
||||
|
||||
wroteAnyData = false;
|
||||
m_wroteAnyData = false;
|
||||
m_output_file.reset(new PSaveFile(m_filename));
|
||||
if (!m_output_file->open(QIODevice::WriteOnly)) {
|
||||
qCCritical(taskNetLogC) << "Could not open " + m_filename + " for writing";
|
||||
@ -72,11 +72,11 @@ Task::State FileSink::write(QByteArray& data)
|
||||
qCCritical(taskNetLogC) << "Failed writing into " + m_filename;
|
||||
m_output_file->cancelWriting();
|
||||
m_output_file.reset();
|
||||
wroteAnyData = false;
|
||||
m_wroteAnyData = false;
|
||||
return Task::State::Failed;
|
||||
}
|
||||
|
||||
wroteAnyData = true;
|
||||
m_wroteAnyData = true;
|
||||
return Task::State::Running;
|
||||
}
|
||||
|
||||
@ -100,7 +100,7 @@ Task::State FileSink::finalize(QNetworkReply& reply)
|
||||
|
||||
// if we wrote any data to the save file, we try to commit the data to the real file.
|
||||
// if it actually got a proper file, we write it even if it was empty
|
||||
if (gotFile || wroteAnyData) {
|
||||
if (gotFile || m_wroteAnyData) {
|
||||
// ask validators for data consistency
|
||||
// we only do this for actual downloads, not 'your data is still the same' cache hits
|
||||
if (!finalizeAllValidators(reply))
|
||||
|
Reference in New Issue
Block a user