mirror of
https://github.com/quickshell-mirror/quickshell.git
synced 2026-10-27 02:54:36 +00:00
tooling: check if .qmlls.ini is a symlink in addition to exists
QFileInfo::exists() returns false on broken symlinks.
This commit is contained in:
1 file changed
+4
-1
@@ -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);
|
||||
|
||||
Reference in new issue
Block a user