# HG changeset patch # User Chris Cannam # Date 1427280891 0 # Node ID c49d52386cde0844cef30d8904a4fe409cec3d5c # Parent 5c5d4863b42849fdc0e2062858a0c4acc725047b Fix to opening debug file diff -r 5c5d4863b428 -r c49d52386cde base/Debug.cpp --- 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)) {