From 8805fdb391d146e0d59b94930569799f936b1a5c Mon Sep 17 00:00:00 2001 From: Orgad Shaneh Date: Sun, 27 Aug 2017 11:23:39 +0300 Subject: QFileSystemEngine: Minor cleanup in unix Change-Id: I4a123484ea1f5e53af85a52e86d4a80cef1cd7bc Reviewed-by: Thiago Macieira --- src/corelib/io/qfilesystemengine_unix.cpp | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) (limited to 'src/corelib') diff --git a/src/corelib/io/qfilesystemengine_unix.cpp b/src/corelib/io/qfilesystemengine_unix.cpp index db8fe71326..1c07a0b7aa 100644 --- a/src/corelib/io/qfilesystemengine_unix.cpp +++ b/src/corelib/io/qfilesystemengine_unix.cpp @@ -638,13 +638,8 @@ QFileSystemEntry QFileSystemEngine::getLinkTarget(const QFileSystemEntry &link, } ret += QFile::decodeName(s); - if (!ret.startsWith(QLatin1Char('/'))) { - const QString linkPath = link.path(); - if (linkPath.startsWith(QLatin1Char('/'))) - ret.prepend(linkPath + QLatin1Char('/')); - else - ret.prepend(QDir::currentPath() + QLatin1Char('/') + linkPath + QLatin1Char('/')); - } + if (!ret.startsWith(QLatin1Char('/'))) + ret.prepend(absoluteName(link).path() + QLatin1Char('/')); ret = QDir::cleanPath(ret); if (ret.size() > 1 && ret.endsWith(QLatin1Char('/'))) ret.chop(1); -- cgit v1.2.3