[SCM] kdeconnect packaging branch, master, updated. debian/0.9g-1-1183-g9d69498
Maximiliano Curia
maxy at moszumanska.debian.org
Fri Oct 14 14:28:05 UTC 2016
Gitweb-URL: http://git.debian.org/?p=pkg-kde/kde-extras/kdeconnect.git;a=commitdiff;h=27e3dfd
The following commit has been merged in the master branch:
commit 27e3dfdca540678555ff94f93df4f9bbcea6ea01
Author: Jan Grulich <jgrulich at redhat.com>
Date: Mon Nov 10 15:46:49 2014 +0100
Make sure that key.pem is created for the first time
Construct its path instead of trying to find it, because
this returns an empty path and thus key.pem couldn't be
created.
Reviewed-by: Lukáš Tinkl
---
core/daemon.cpp | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/core/daemon.cpp b/core/daemon.cpp
index 3bf4d1c..0ec6a7d 100644
--- a/core/daemon.cpp
+++ b/core/daemon.cpp
@@ -20,6 +20,7 @@
#include "daemon.h"
+#include <QDir>
#include <QUuid>
#include <QFile>
#include <QFileInfo>
@@ -85,7 +86,8 @@ Daemon::Daemon(QObject *parent)
const QFile::Permissions strict = QFile::ReadOwner | QFile::WriteOwner | QFile::ReadUser | QFile::WriteUser;
if (!config->group("myself").hasKey("privateKeyPath"))
{
- const QString privateKeyPath = QStandardPaths::locate(QStandardPaths::QStandardPaths::DataLocation, QStringLiteral("key.pem"));
+ QDir().mkpath(QStandardPaths::writableLocation(QStandardPaths::DataLocation));
+ const QString privateKeyPath = QStandardPaths::writableLocation(QStandardPaths::DataLocation) + QStringLiteral("/key.pem");
QFile privKey(privateKeyPath);
@@ -94,7 +96,7 @@ Daemon::Daemon(QObject *parent)
qCDebug(KDECONNECT_CORE) << "Error: KDE Connect could not create private keys file: " << privateKeyPath;
return;
}
-
+
if (!privKey.setPermissions(strict))
{
qCDebug(KDECONNECT_CORE) << "Error: KDE Connect could not set permissions for private file: " << privateKeyPath;
--
kdeconnect packaging
More information about the pkg-kde-commits
mailing list