[X2Go-Commits] [x2goclient] 02/03: src/onmainwindow.cpp: stop duplicating the list of known sftp-server binary locations.
git-admin at x2go.org
git-admin at x2go.org
Fri Dec 9 16:54:58 CET 2016
This is an automated email from the git hooks/post-receive script.
x2go pushed a commit to branch bugfix/osx
in repository x2goclient.
commit 3e0a07f6f4c5a16ca076ab623037cc4ceefc444a
Author: Mihai Moldovan <ionic at ionic.de>
Date: Fri Dec 9 16:52:51 2016 +0100
src/onmainwindow.cpp: stop duplicating the list of known sftp-server binary locations.
---
debian/changelog | 2 ++
src/onmainwindow.cpp | 25 +++++++++----------------
2 files changed, 11 insertions(+), 16 deletions(-)
diff --git a/debian/changelog b/debian/changelog
index 430eca8..49cb673 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -479,6 +479,8 @@ x2goclient (4.0.5.3-0x2go1) UNRELEASED; urgency=medium
- src/onmainwindow.cpp: move generateEtcFiles () call to startSshd (). We
must make sure that the sshd_config file exists and is up-to-date, so
let's always do it right before starting the sshd binary.
+ - src/onmainwindow.cpp: stop duplicating the list of known sftp-server
+ binary locations.
[ Bernard Cafarelli ]
* New upstream version (4.0.5.3):
diff --git a/src/onmainwindow.cpp b/src/onmainwindow.cpp
index e367a4d..9e79ee0 100644
--- a/src/onmainwindow.cpp
+++ b/src/onmainwindow.cpp
@@ -10162,20 +10162,19 @@ void ONMainWindow::generateEtcFiles()
*/
QString sftp_binary;
+ QStringList common_sftp_dirs;
+ common_sftp_dirs << "/usr/lib/openssh" /* Debian and Ubuntu */
+ << "/usr/libexec/openssh" /* Fedora, CentOS, hopefully also RHEL */
+ << "/usr/lib/ssh/" /* Mageia, OpenSUSE, SLE{S,D} < 12 x86, SLE{S,D} 12, Arch */
+ << "/usr/lib64/ssh" /* SLE{S,D} < 12 x86_64 */
+ << "/usr/lib/misc" /* Gentoo */
+ << "/usr/libexec"; /* Slackware, OS X */
#if QT_VERSION < 0x050000
QProcessEnvironment tmp_env = QProcessEnvironment::systemEnvironment ();
QString path_val = tmp_env.value ("PATH");
- QStringList to_back;
- to_back << "/usr/lib/openssh" /* Debian and Ubuntu */
- << "/usr/libexec/openssh" /* Fedora, CentOS, hopefully also RHEL */
- << "/usr/lib/ssh/" /* Mageia, OpenSUSE, SLE{S,D} < 12 x86, SLE{S,D} 12, Arch */
- << "/usr/lib64/ssh" /* SLE{S,D} < 12 x86_64 */
- << "/usr/lib/misc" /* Gentoo */
- << "/usr/libexec"; /* Slackware, OS X */
-
- add_to_path (path_val, to_back);
+ add_to_path (path_val, common_sftp_dirs);
/* Just in case we bundle sftp-server ourselves. */
sftp_binary = find_binary (appDir, "sftp-server");
@@ -10195,13 +10194,7 @@ void ONMainWindow::generateEtcFiles()
sftp_binary = QStandardPaths::findExecutable ("sftp-binary", search_paths);
if (sftp_binary.isEmpty ()) {
- search_paths = QStringList ();
- search_paths << "/usr/lib/openssh" /* Debian and Ubuntu */
- << "/usr/libexec/openssh" /* Fedora, CentOS, hopefully also RHEL */
- << "/usr/lib/ssh/" /* Mageia, OpenSUSE, SLE{S,D} < 12 x86, SLE{S,D} 12, Arch */
- << "/usr/lib64/ssh" /* SLE{S,D} < 12 x86_64 */
- << "/usr/lib/misc" /* Gentoo */
- << "/usr/libexec"; /* Slackware, OS X */
+ search_paths = common_sftp_dirs;
sftp_binary = QStandardPaths::findExecutable ("sftp-server", search_paths);
}
--
Alioth's /srv/git/code.x2go.org/x2goclient.git//..//_hooks_/post-receive-email on /srv/git/code.x2go.org/x2goclient.git
More information about the x2go-commits
mailing list