File tree 1 file changed +7
-8
lines changed
1 file changed +7
-8
lines changed Original file line number Diff line number Diff line change @@ -345,17 +345,16 @@ export async function initProjectCreator(context: vscode.ExtensionContext) {
345
345
// Note: At some point we may want to detect/avoid duplicate names, e.g. if the user already
346
346
// references a project via 'foo', and they add a reference to a 'foo' on GitHub or in another dir.
347
347
348
- const projectChoices : Array < { name : string ; ref : LocalProjectRef } > = [ ] ;
349
-
350
- projectFiles . forEach ( ( file ) => {
351
- const dirName = file . path . slice ( 0 , - "/qsharp.json" . length ) ;
352
- const relPath = getRelativeDirPath ( qsharpJsonDir ! . path , dirName ) ;
353
- projectChoices . push ( {
354
- name : dirName . slice ( dirName . lastIndexOf ( "/" ) + 1 ) ,
348
+ const projectChoices = projectFiles . map ( ( file ) => {
349
+ // normalize the path using the vscode Uri API
350
+ const dirUri = vscode . Uri . joinPath ( file , ".." ) ;
351
+ const relPath = getRelativeDirPath ( qsharpJsonDir ! . path , dirUri . path ) ;
352
+ return {
353
+ name : dirUri . path . split ( "/" ) . pop ( ) ! ,
355
354
ref : {
356
355
path : relPath ,
357
356
} ,
358
- } ) ;
357
+ } ;
359
358
} ) ;
360
359
361
360
projectChoices . forEach (
You can’t perform that action at this time.
0 commit comments