Skip to content

Commit e885f4a

Browse files
committed
tooling: check if .qmlls.ini is a symlink in addition to exists
QFileInfo::exists() returns false on broken symlinks.
1 parent 115d671 commit e885f4a

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/core/toolsupport.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,10 +108,13 @@ bool QmlToolingSupport::updateQmllsConfig(const QDir& configRoot, bool create) {
108108
auto vfsConfigPath = QsPaths::instance()->shellVfsDir()->filePath(".qmlls.ini");
109109

110110
auto shellFileInfo = QFileInfo(shellConfigPath);
111-
if (!create && !shellFileInfo.exists()) {
111+
if (!create && !shellFileInfo.exists() && !shellFileInfo.isSymLink()) {
112112
if (QmlToolingSupport::toolingEnabled) {
113113
qInfo() << "QML tooling support disabled";
114114
QmlToolingSupport::toolingEnabled = false;
115+
} else {
116+
qCInfo(logTooling) << "Not enabling QML tooling support, qmlls.ini is missing at path"
117+
<< shellConfigPath;
115118
}
116119

117120
QFile::remove(vfsConfigPath);

0 commit comments

Comments
 (0)