contextUri.path wrongly uppercased on Windows #116298
Labels
file-explorer
Explorer widget issues
under-discussion
Issue is under discussion for relevance, priority, approach
Milestone
Hi, I'm the author of the Angular schematics extension (400 000 users).
Basically, it's a graphic interface for the Angular CLI (ie. the generation of component files), so the user right-click on a folder in the Explorer menu where he/she wants to generate, then the extension retrieves the folder path and pre-fill the component path.
To do so, I basically do this:
where
contextUri
is the argument passed by VS Code when the user right-clicked a folder and chose "Angular: Generate something" in the context menu from the extension.Issue is on Windows,
contextUri.path
is inconsistent:/c:/Users/Elmo/angular-project/right-clicked-folder
), which is what is expected as all other VS Codepath
s are like that (for exampleworkspaceFolder.uri.path
)/C:/Users/Elmo/angular-project/right-clicked-folder
), which causespath.posix.relative()
to give the wrong resultWhen testing myself, the second and wrong scenario happens only in a multi-workspaces setup. But the user of the extension who reported the issue first is telling he is in a single workspace setup.
Steps to Reproduce:
On Windows:
npm install @angular/cli -g
ng new
(options asked don't matter)ng new
(options asked don't matter)git clone https://github.com/cyrilletuzi/vscode-angular-schematics
cd vscode-angular-schematics
git checkout windowsissuewithcontexturi
npm install
/c:/Users/Elmo/angular-project/right-clicked-folder
)/C:/Users/Elmo/angular-project/right-clicked-folder
)Does this issue occur when all extensions are disabled?: Yes
The text was updated successfully, but these errors were encountered: