QFileSystemEngine: Minor cleanup in unix
Change-Id: I4a123484ea1f5e53af85a52e86d4a80cef1cd7bc Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This commit is contained in:
parent
eb2e984da1
commit
8805fdb391
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user