Skip to content

Extension does not find CodeQL databases using typical Windows paths #3949

Open
@data-douser

Description

@data-douser

Describe the bug
When selecting a CodeQL database to open from a local path, the GitHub.vscode-codeql extension asks the user (via text input pop-up) to provide a path to the local database to be imported, but this only works with forward slashes. Thus, if the user copies a path from their Windows terminal and pastes that path into the text input, the extension will tell the user that the path does not exist. For example C:\ does not exist, but C:/ does.

Version

CodeQL CLI version: 2.20.0

CodeQL Extension version: 1.17.1

Visual Studio Code:

Version: 1.97.2 (user setup)
Commit: e54c774e0add60467559eb0d1e229c6452cf8447
Date: 2025-02-12T23:20:35.343Z
Electron: 32.2.7
ElectronBuildId: 10982180
Chromium: 128.0.6613.186
Node.js: 20.18.1
V8: 12.8.374.38-electron.0
OS: Windows_NT x64 10.0.19045

To reproduce
Start by using Visual Studio Code on Windows. Within the CodeQL extension in Visual Studio Code, select the "Choose Database from Folder" icon from the context menu of the "DATABASES" view. Supply any valid file (or directory) path using backslash (i.e. \) characters and observe the message about the path not existing.

Expected behavior
Expected to be able to find the database path in a Windows terminal, copy that path to clipboard, and paste that path (with back-slashes) when choosing the database folder to open.

Additional context
None

Metadata

Metadata

Assignees

No one assigned

    Labels

    VSCodebugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions