From b477dd51c9a0bf1776031a6eabab2b1c5176b5d3 Mon Sep 17 00:00:00 2001 From: Christian Mollekopf Date: Mon, 7 Nov 2016 21:49:21 +0100 Subject: One error is enough if the source is not existing. --- common/test.cpp | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'common') diff --git a/common/test.cpp b/common/test.cpp index 0982293..cf2e8a3 100644 --- a/common/test.cpp +++ b/common/test.cpp @@ -55,14 +55,16 @@ void Sink::Test::initTest() //We copy those files so we can control debug output from outside the test with sinksh { + QDir dir; + dir.mkpath(Sink::configLocation()); + QFile file(logIniFile); if (!file.open(QIODevice::ReadOnly)) { qWarning() << "Failed to open the file: " << logIniFile; - } - QDir dir; - dir.mkpath(Sink::configLocation()); - if (!file.copy(Sink::configLocation() + "/log.ini")) { - qWarning() << "Failed to move the file: " << Sink::configLocation() + "/log.ini"; + } else { + if (!file.copy(Sink::configLocation() + "/log.ini")) { + qWarning() << "Failed to move the file: " << Sink::configLocation() + "/log.ini"; + } } } { -- cgit v1.2.3