forked from qt-creator/qt-creator
Utils: Reduce need for resolving of symlinks
Be more strict when checking whether two files might be the same executable. As side-effect this reduces the calls to symLinkTarget() a lot and speeds up auto detection of kits. Change-Id: I23dc697a34bf93f8bd09cbe7e9d17f829cf0d010 Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
@@ -183,6 +183,8 @@ bool Environment::isSameExecutable(const QString &exe1, const QString &exe2) con
|
|||||||
const FilePath f2 = FilePath::fromString(i2);
|
const FilePath f2 = FilePath::fromString(i2);
|
||||||
if (f1 == f2)
|
if (f1 == f2)
|
||||||
return true;
|
return true;
|
||||||
|
if (f1.needsDevice() != f2.needsDevice() || f1.scheme() != f2.scheme())
|
||||||
|
return false;
|
||||||
if (f1.resolveSymlinks() == f2.resolveSymlinks())
|
if (f1.resolveSymlinks() == f2.resolveSymlinks())
|
||||||
return true;
|
return true;
|
||||||
if (FileUtils::fileId(f1) == FileUtils::fileId(f2))
|
if (FileUtils::fileId(f1) == FileUtils::fileId(f2))
|
||||||
|
Reference in New Issue
Block a user