diff options
author | Christian Mollekopf <chrigi_1@fastmail.fm> | 2018-02-20 19:06:21 +0100 |
---|---|---|
committer | Christian Mollekopf <chrigi_1@fastmail.fm> | 2018-06-29 10:09:00 +0200 |
commit | 35f4d554203640bc4bf0e072f8f263396100cf52 (patch) | |
tree | e40aa865f48f8b79949f4dee1d596b30f9713108 /framework/src/file.cpp | |
parent | 7ce196b5552b2acfa2d54e46809dd4248b63a156 (diff) | |
download | kube-35f4d554203640bc4bf0e072f8f263396100cf52.tar.gz kube-35f4d554203640bc4bf0e072f8f263396100cf52.zip |
Support loading a mime message from a file
Diffstat (limited to 'framework/src/file.cpp')
-rw-r--r-- | framework/src/file.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/framework/src/file.cpp b/framework/src/file.cpp index b2a19c23..a57b3a38 100644 --- a/framework/src/file.cpp +++ b/framework/src/file.cpp | |||
@@ -36,7 +36,7 @@ QString File::data() | |||
36 | 36 | ||
37 | QString File::read(const QString &path) | 37 | QString File::read(const QString &path) |
38 | { | 38 | { |
39 | QFile file(QDir::homePath() + "/" + path); | 39 | QFile file(QDir::isAbsolutePath(path) ? path : QDir::homePath() + "/" + path); |
40 | if (file.open(QIODevice::ReadOnly)) { | 40 | if (file.open(QIODevice::ReadOnly)) { |
41 | return file.readAll(); | 41 | return file.readAll(); |
42 | } | 42 | } |