This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch bugfix/osx in repository x2goclient.
commit 1593e83e8cd817b2ba25e199f35a2d5f546f4442 Author: Mihai Moldovan <io...@ionic.de> Date: Fri Dec 9 18:51:15 2016 +0100 src/x2goutils.cpp: fix add_to_path (). We want to remove trailing slashes from elements-to-add, not just fetch a trailing slash if encountered. Also, better don't compare a value from the original path value to itself, but rather to the things we want to add in order to remove duplicates, not remove most of the list of elements to add... --- debian/changelog | 5 +++++ src/x2goutils.cpp | 5 +++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/debian/changelog b/debian/changelog index 7e488ed..546f11b 100644 --- a/debian/changelog +++ b/debian/changelog @@ -511,6 +511,11 @@ x2goclient (4.0.5.3-0x2go1) UNRELEASED; urgency=medium - src/onmainwindow.cpp: remove trailing slash from Mageia/SUSE/Arch sftp-server binary search path. - src/x2goutils.cpp: add debugging output to add_to_path (). + - src/x2goutils.cpp: fix add_to_path (). We want to remove trailing + slashes from elements-to-add, not just fetch a trailing slash if + encountered. Also, better don't compare a value from the original path + value to itself, but rather to the things we want to add in order to + remove duplicates, not remove most of the list of elements to add... [ Bernard Cafarelli ] * New upstream version (4.0.5.3): diff --git a/src/x2goutils.cpp b/src/x2goutils.cpp index 0a01b62..d076c74 100644 --- a/src/x2goutils.cpp +++ b/src/x2goutils.cpp @@ -226,7 +226,8 @@ QString add_to_path (const QString &orig_path, const QStringList &add, const boo for (int i = 0; i < add.size (); ++i) { if (!(add[i].isEmpty ())) { if (add[i].right (1) == "/") { - QString tmp_elem = add[i].right (1); + QString tmp_elem = add[i]; + tmp_elem.chop (1); if (!(tmp_elem.isEmpty ())) { tmp_clean_add.append (tmp_elem); @@ -254,7 +255,7 @@ QString add_to_path (const QString &orig_path, const QStringList &add, const boo bool tmp_found = false; for (QStringList::const_iterator cit2 = cit + 1; cit2 != end; ++cit2) { - if (*cit == *cit) { + if (*cit == *cit2) { tmp_found = true; break; } -- 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