From 147ff551906cb941e4b9eae0fbc1abbaa8b09acf Mon Sep 17 00:00:00 2001 From: Bakasura Date: Mon, 1 Feb 2021 20:43:27 -0500 Subject: [PATCH] Escape semicolon in log CSV file --- src/NgPost.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/NgPost.cpp b/src/NgPost.cpp index ddd93b99..c8a6c089 100644 --- a/src/NgPost.cpp +++ b/src/NgPost.cpp @@ -918,17 +918,17 @@ qDebug() << "[MB_TRACE][Issue#82][NgPost::onPostingJobFinished] job: " << job { QTextStream stream(&hist); stream << QDateTime::currentDateTime().toString("yyyy/MM/dd hh:mm:ss") - << _historyFieldSeparator << _activeJob->nzbName() + << _historyFieldSeparator << "\"" << _activeJob->nzbName() << "\"" << _historyFieldSeparator << _activeJob->postSize() << _historyFieldSeparator << _activeJob->avgSpeed(); if (_activeJob->hasCompressed()) - stream << _historyFieldSeparator << _activeJob->rarName() - << _historyFieldSeparator << _activeJob->rarPass(); + stream << _historyFieldSeparator << "\"" << _activeJob->rarName() << "\"" + << _historyFieldSeparator << "\"" << _activeJob->rarPass() << "\""; else stream << _historyFieldSeparator << _historyFieldSeparator; stream << _historyFieldSeparator << _activeJob->groups() - << _historyFieldSeparator << _activeJob->from() + << _historyFieldSeparator << "\"" << _activeJob->from() << "\"" << "\n" << MB_FLUSH; hist.close(); }