Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion source/pip/qsharp/_qsharp.py
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ def __init__(
# In the future, we may support other schemes, such as github, if/when
# we have VS Code Web + Jupyter support.
normalized_root = os.path.normpath(os.path.join(os.getcwd(), project_root))
self._config["projectRoot"] = "file://" + normalized_root
self._config["projectRoot"] = "file:///" + normalized_root
Comment thread
orpuente-MS marked this conversation as resolved.
Outdated

def __repr__(self) -> str:
return "Q# initialized with configuration: " + str(self._config)
Expand Down
9 changes: 8 additions & 1 deletion source/vscode/src/projectSystem.ts
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,14 @@ export async function listDirectory(

const fileSearchResult = await vscode.workspace.fs.readDirectory(uriToQuery);
const mappedFiles: [string, vscode.FileType][] = fileSearchResult.map(
([name, type]) => [Utils.joinPath(uriToQuery, name).toString(), type],
([name, type]) => [
// Rust expects paths, not encoded URIs, so we need to decode here.
Comment thread
orpuente-MS marked this conversation as resolved.
Outdated
// We need to decode the components and then the URI.
decodeURI(
decodeURIComponent(Utils.joinPath(uriToQuery, name).toString()),
Comment thread
orpuente-MS marked this conversation as resolved.
Outdated
),
type,
],
);

return mappedFiles;
Expand Down
Loading