[Pkg-owncloud-commits] [owncloud-client] 14/498: Cleaner creation of link path. Using QDir ensures that every needed / is present

Sandro Knauß hefee-guest at moszumanska.debian.org
Tue Aug 11 14:48:28 UTC 2015


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

hefee-guest pushed a commit to branch master
in repository owncloud-client.

commit 9351c5eefa8e84737f78fb23b3eed11fbbea6d19
Author: Luca Lorenzetto <luca.lorenzetto at infocamere.it>
Date:   Fri Mar 13 16:23:43 2015 +0100

    Cleaner creation of link path. Using QDir ensures that every needed / is present
---
 src/libsync/utility_win.cpp | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/libsync/utility_win.cpp b/src/libsync/utility_win.cpp
index b7fed27..f3971cf 100644
--- a/src/libsync/utility_win.cpp
+++ b/src/libsync/utility_win.cpp
@@ -57,14 +57,14 @@ static void setupFavLink_private(const QString &folder)
         wchar_t *path = NULL;
         if(SHGetKnownFolderPathPtr(FOLDERID_Links, 0, NULL, &path) == S_OK) {
             QString Links= QDir::fromNativeSeparators(QString::fromWCharArray(path)); 
-            linkName = Links + folderDir.dirName() + QLatin1String(".lnk");
+            linkName = QDir(Links).filePath(folderDir.dirName() + QLatin1String(".lnk"));
         }
     } else {
         /* Use legacy functions */
         wchar_t path[MAX_PATH];
         SHGetSpecialFolderPath(0, path, CSIDL_PROFILE, FALSE);
         QString profile = QDir::fromNativeSeparators(QString::fromWCharArray(path));
-        linkName = profile+QLatin1String("/Links/") + folderDir.dirName() + QLatin1String(".lnk");
+        linkName = QDir(profile).filePath(QDir(QLatin1String("Links")).filePath(folderDir.dirName() + QLatin1String(".lnk")));
     }
     qDebug() << Q_FUNC_INFO << " creating link from " << linkName << " to " << folder;
     if (!QFile::link(folder, linkName))

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-owncloud/owncloud-client.git



More information about the Pkg-owncloud-commits mailing list