summaryrefslogtreecommitdiffstats
path: root/src/downloadmanager.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/downloadmanager.cpp')
-rw-r--r--src/downloadmanager.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/downloadmanager.cpp b/src/downloadmanager.cpp
index 47582c8..0cd7c80 100644
--- a/src/downloadmanager.cpp
+++ b/src/downloadmanager.cpp
@@ -164,6 +164,7 @@ void DownloadManager::downloadFinished()
// check for errors
if (currentDownload->error()){
currentDownload->deleteLater();
+ outfile.close();
outfile.remove();
int statusCode = currentDownload->attribute(QNetworkRequest::HttpStatusCodeAttribute).toInt();
qxtLog->debug() << "Download of " << currentDownload->url().toString()
@@ -171,6 +172,7 @@ void DownloadManager::downloadFinished()
emit notify(QString("Download failed! HTTP Status Code: %1").arg(statusCode));
}
else{
+ completeKCL();
// end download
currentDownload->deleteLater();
outfile.close();
@@ -188,6 +190,16 @@ void DownloadManager::downloadFinished()
}
startNextDownload();
}
+// ----------------------------------------------------------------------------------------
+void DownloadManager::completeKCL(){
+ // check if current download is kcl
+
+ if (outfile.fileName() == downloadDir.absoluteFilePath("kcl")){
+ qxtLog->debug() << "Completing kernel command line ...";
+ outfile.write(" session=" + sessionID.toUtf8());
+
+ }
+}
/********************************************************************************************************
*
** dead code: Header filename fetching & renaming **