Mercurial > hg > svcore
changeset 1058:c49d52386cde tonioni
Fix to opening debug file
author | Chris Cannam |
---|---|
date | Wed, 25 Mar 2015 10:54:51 +0000 |
parents | 5c5d4863b428 |
children | 7598a78cf915 c1e43c8d2527 |
files | base/Debug.cpp |
diffstat | 1 files changed, 3 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/base/Debug.cpp Mon Mar 23 11:26:28 2015 +0000 +++ b/base/Debug.cpp Wed Mar 25 10:54:51 2015 +0000 @@ -46,10 +46,11 @@ prefix = strdup(QString("[%1]") .arg(QCoreApplication::applicationPid()) .toLatin1().data()); - //!!! what to do if mkpath fails? - if (!logdir.exists()) logdir.mkpath(logdir.path()); } + //!!! what to do if mkpath fails? + if (!logdir.exists()) logdir.mkpath(logdir.path()); + if (!debugs.hasLocalData()) { QFile *logFile = new QFile(logdir.path() + "/sv-debug.log"); if (logFile->open(QIODevice::WriteOnly | QIODevice::Append)) {