summaryrefslogtreecommitdiffstats
path: root/common/test.cpp
diff options
context:
space:
mode:
authorChristian Mollekopf <chrigi_1@fastmail.fm>2016-11-07 21:49:21 +0100
committerChristian Mollekopf <chrigi_1@fastmail.fm>2016-11-07 21:49:21 +0100
commitb477dd51c9a0bf1776031a6eabab2b1c5176b5d3 (patch)
treefe9b8307487ba76630fd71700acb724b9d19e5c6 /common/test.cpp
parent89b6f63bab839ab0504cd3067f0389afe4dc47e3 (diff)
downloadsink-b477dd51c9a0bf1776031a6eabab2b1c5176b5d3.tar.gz
sink-b477dd51c9a0bf1776031a6eabab2b1c5176b5d3.zip
One error is enough if the source is not existing.
Diffstat (limited to 'common/test.cpp')
-rw-r--r--common/test.cpp12
1 files changed, 7 insertions, 5 deletions
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()
55 55
56 //We copy those files so we can control debug output from outside the test with sinksh 56 //We copy those files so we can control debug output from outside the test with sinksh
57 { 57 {
58 QDir dir;
59 dir.mkpath(Sink::configLocation());
60
58 QFile file(logIniFile); 61 QFile file(logIniFile);
59 if (!file.open(QIODevice::ReadOnly)) { 62 if (!file.open(QIODevice::ReadOnly)) {
60 qWarning() << "Failed to open the file: " << logIniFile; 63 qWarning() << "Failed to open the file: " << logIniFile;
61 } 64 } else {
62 QDir dir; 65 if (!file.copy(Sink::configLocation() + "/log.ini")) {
63 dir.mkpath(Sink::configLocation()); 66 qWarning() << "Failed to move the file: " << Sink::configLocation() + "/log.ini";
64 if (!file.copy(Sink::configLocation() + "/log.ini")) { 67 }
65 qWarning() << "Failed to move the file: " << Sink::configLocation() + "/log.ini";
66 } 68 }
67 } 69 }
68 { 70 {