forked from qt-creator/qt-creator
Utils: Speed up isDirectory for roots
Change-Id: Ic369bb1b6a5deb84f0da38af7e71d51139a67c9e Reviewed-by: <github-actions-qt-creator@cristianadam.eu> Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
This commit is contained in:
@@ -884,6 +884,9 @@ bool UnixDeviceFileAccess::isFile(const FilePath &filePath) const
|
||||
|
||||
bool UnixDeviceFileAccess::isDirectory(const FilePath &filePath) const
|
||||
{
|
||||
if (filePath.isRootPath())
|
||||
return true;
|
||||
|
||||
const QString path = filePath.path();
|
||||
return runInShellSuccess({"test", {"-d", path}, OsType::OsTypeLinux});
|
||||
}
|
||||
|
Reference in New Issue
Block a user