forked from quickshell/quickshell
		
	tooling: check if .qmlls.ini is a symlink in addition to exists
QFileInfo::exists() returns false on broken symlinks.
This commit is contained in:
		
							parent
							
								
									115d6717a8
								
							
						
					
					
						commit
						e885f4aec1
					
				
					 1 changed files with 4 additions and 1 deletions
				
			
		| 
						 | 
				
			
			@ -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);
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue