File tree Expand file tree Collapse file tree 1 file changed +9
-3
lines changed Expand file tree Collapse file tree 1 file changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -65,8 +65,8 @@ void QmlScanner::scanDir(const QString& path) {
6565 || c == ' _' )
6666 {
6767 } else {
68- qCWarning (logQmlScanner)
69- << " Module path contains invalid characters for a module name: " << end ;
68+ qCWarning (logQmlScanner) << " Module path contains invalid characters for a module name: "
69+ << path. sliced ( this -> rootPath . path (). length ()) ;
7070 goto skipadd;
7171 }
7272 }
@@ -170,13 +170,19 @@ bool QmlScanner::scanQmlFile(const QString& path) {
170170 ipath = currentdir.filePath (import );
171171 }
172172
173- auto cpath = QFileInfo (ipath).canonicalFilePath ();
173+ auto pathInfo = QFileInfo (ipath);
174+ auto cpath = pathInfo.canonicalFilePath ();
174175
175176 if (cpath.isEmpty ()) {
176177 qCWarning (logQmlScanner) << " Ignoring unresolvable import" << ipath << " from" << path;
177178 continue ;
178179 }
179180
181+ if (!pathInfo.isDir ()) {
182+ qCDebug (logQmlScanner) << " Ignoring non-directory import" << ipath << " from" << path;
183+ continue ;
184+ }
185+
180186 if (import .endsWith (" .js" )) this ->scannedFiles .push_back (cpath);
181187 else this ->scanDir (cpath);
182188 }
You can’t perform that action at this time.
0 commit comments