This is an automated email from the git hooks/post-receive script.

x2go pushed a commit to branch bugfix/osx
in repository x2goclient.

commit d2946a86ef7cc35c659d5b881536a3ace58ac01b
Author: Mihai Moldovan <io...@ionic.de>
Date:   Thu Sep 22 05:32:59 2016 +0200

    src/onmainwindow.cpp: refactor generateKey () a little bit to compact it.
---
 debian/changelog     |    2 ++
 src/onmainwindow.cpp |   19 ++++++++++---------
 2 files changed, 12 insertions(+), 9 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index cab7d87..24b40ef 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -384,6 +384,8 @@ x2goclient (4.0.5.3-0x2go1) UNRELEASED; urgency=medium
     - src/onmainwindow.{cpp,h}: rename generateHostKey () to generateKey ()
       and add a boolean parameter with a default of false to request a public
       key. Change old invocations of generateHostKey () accordingly.
+    - src/onmainwindow.cpp: refactor generateKey () a little bit to compact
+      it.
 
  -- X2Go Release Manager <git-ad...@x2go.org>  Mon, 19 Sep 2016 09:07:07 +0200
 
diff --git a/src/onmainwindow.cpp b/src/onmainwindow.cpp
index 2914bb7..72620e1 100644
--- a/src/onmainwindow.cpp
+++ b/src/onmainwindow.cpp
@@ -10332,21 +10332,22 @@ void 
ONMainWindow::generateKey(ONMainWindow::key_types key_type, bool host_key)
         close ();
     }
 
-    QString etcDir = homeDir + "/.x2go/etc/";
-    QDir dr (homeDir);
-    dr.mkpath (etcDir);
-    QString private_key_file = etcDir + "/ssh_host_" + stringified_key_type + 
"_key";
+    QString etc_dir = homeDir + "/.x2go/etc/";
+    QDir dir (homeDir);
+    dir.mkpath (etc_dir);
+    QString private_key_file = "";
+#ifdef Q_OS_WIN
+    private_key_file = cygwinPath (wapiShortFileName (etc_dir));
+#else
+    private_key_file = etc_dir;
+#endif
+    private_key_file += "/ssh_host_" + stringified_key_type + "_key";
     QString public_key_file = private_key_file + ".pub";
 
     if ((!(QFile::exists (private_key_file))) || (!(QFile::exists 
(public_key_file))))
     {
         x2goDebug << "Generating host key. Type: " << stringified_key_type;
 
-#ifdef Q_OS_WIN
-        private_key_file = cygwinPath (wapiShortFileName (etcDir))
-                         + "/ssh_host_" + stringified_key_type + "_key";
-#endif
-
         QStringList args;
         args << "-t"
              << stringified_key_type

--
Alioth's /srv/git/code.x2go.org/x2goclient.git//..//_hooks_/post-receive-email 
on /srv/git/code.x2go.org/x2goclient.git
_______________________________________________
x2go-commits mailing list
x2go-commits@lists.x2go.org
http://lists.x2go.org/listinfo/x2go-commits

Reply via email to