Extension does not find CodeQL databases using typical Windows paths

Open
#3,949 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
45/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
typescript, vscode
Domain
desktop, devtools

Research direction

Start by locating the handler for the CodeQL extension's “Choose Database from Folder” action and the path validation used by its text input. Reproduce the issue on Windows with a valid path containing backslashes, then verify that the database can be selected using the copied Windows path and that existing forward-slash paths still work.

Written by the indexing model from the issue text.

Description

bug VSCode

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

Dominant language
TypeScript
Stars
539
Forks
240
Avg merge
2d 6h
Merged PRs (30d)
29

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from github/vscode-codeql

All issues in github/vscode-codeql

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.