diff base/Debug.cpp @ 1058:c49d52386cde tonioni

Fix to opening debug file
author Chris Cannam
date Wed, 25 Mar 2015 10:54:51 +0000
parents e8e6c4e7437b
children c1e43c8d2527
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)) {