mirror of
https://github.com/github/codeql.git
synced 2026-04-30 19:26:02 +02:00
Merge pull request #9115 from erik-krogh/fileAndFolder
JS: resolve main module when there is a folder with the same name as the main file
This commit is contained in:
@@ -96,7 +96,7 @@ File resolveMainModule(PackageJson pkg, int priority) {
|
||||
or
|
||||
result = tryExtensions(main.resolve(), "index", priority)
|
||||
or
|
||||
not exists(main.resolve()) and
|
||||
not main.resolve() instanceof File and
|
||||
exists(int n | n = main.getNumComponent() |
|
||||
result = tryExtensions(main.resolveUpTo(n - 1), getStem(main.getComponent(n - 1)), priority)
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user