tooling: check if .qmlls.ini is a symlink in addition to exists

QFileInfo::exists() returns false on broken symlinks.
This commit is contained in:
outfoxxed 2025-07-18 00:07:25 -07:00
parent 115d6717a8
commit e885f4aec1
Signed by untrusted user: outfoxxed
GPG key ID: 4C88A185FB89301E

View file

@ -108,10 +108,13 @@ bool QmlToolingSupport::updateQmllsConfig(const QDir& configRoot, bool create) {
auto vfsConfigPath = QsPaths::instance()->shellVfsDir()->filePath(".qmlls.ini");
auto shellFileInfo = QFileInfo(shellConfigPath);
if (!create && !shellFileInfo.exists()) {
if (!create && !shellFileInfo.exists() && !shellFileInfo.isSymLink()) {
if (QmlToolingSupport::toolingEnabled) {
qInfo() << "QML tooling support disabled";
QmlToolingSupport::toolingEnabled = false;
} else {
qCInfo(logTooling) << "Not enabling QML tooling support, qmlls.ini is missing at path"
<< shellConfigPath;
}
QFile::remove(vfsConfigPath);