From a2f6768f6ca347e44c086c6e94f1d3398b8ad6be Mon Sep 17 00:00:00 2001 From: Aditya Kulkarni Date: Tue, 6 Nov 2018 13:47:23 -0800 Subject: [PATCH] Skip existing files --- src/connection.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/connection.cpp b/src/connection.cpp index 8731d56..f692ca2 100644 --- a/src/connection.cpp +++ b/src/connection.cpp @@ -139,6 +139,11 @@ void ConnectionLoader::doNextDownload(std::function cb) { QString paramsDir = zcashParamsDir(); currentOutput = new QFile(QDir(paramsDir).filePath(filename)); + if (currentOutput->exists()) { + qDebug() << filename << " already exists, skipping "; + doNextDownload(cb); + } + if (!currentOutput->open(QIODevice::WriteOnly)) { this->showError("Couldn't download params. Please check the help site for more info."); }