Skip to content

Loading databases in directories named db-* fails with error 'does not contain a CodeQL dbscheme' #482

@smowton

Description

@smowton

Describe the bug
Loading databases in directories named db-* fails with error 'does not contain a CodeQL dbscheme'

To Reproduce
Find any old CodeQL database, verify you can load it with the plugin's "Choose database from folder" GUI. Copy it to /tmp/db-test, try to load it from there.

You should get an error Database '/tmp' does not contain a CodeQL dbscheme under '/tmp/db-test'.

Expected behavior
Loading should succeed

Looks like this glob is at fault for misidentifying the database root as a db-$langname dataset stored within it: https://github.com/github/vscode-codeql/blob/main/extensions/ql-vscode/src/databases.ts#L88

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions