mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-14 18:46:34 -05:00
fix projects notification showing when it shouldn't (#15890)
* fix projects notification showing when it shouldn't * use path.resolve
This commit is contained in:
@@ -218,6 +218,11 @@ export class WorkspaceService implements IWorkspaceService {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns an array of all the supported projects in the folder
|
||||
* @param folder folder to look look for projects
|
||||
* @returns array of file paths of supported projects
|
||||
*/
|
||||
async getAllProjectsInFolder(folder: vscode.Uri): Promise<string[]> {
|
||||
// get the unique supported project extensions
|
||||
const supportedProjectExtensions = [...new Set((await this.getAllProjectTypes()).map(p => { return p.projectFileExtension; }))];
|
||||
@@ -229,7 +234,8 @@ export class WorkspaceService implements IWorkspaceService {
|
||||
// so the filter needs to be in the format folder/**/*.sqlproj if there's only one supported projectextension
|
||||
const projFilter = supportedProjectExtensions.length > 1 ? path.posix.join(escapedPath, '**', `*.{${supportedProjectExtensions.toString()}}`) : path.posix.join(escapedPath, '**', `*.${supportedProjectExtensions[0]}`);
|
||||
|
||||
return await glob(projFilter);
|
||||
// glob will return an array of file paths with forward slashes, so they need to be converted back if on windows
|
||||
return (await glob(projFilter)).map(p => path.resolve(p));
|
||||
}
|
||||
|
||||
async getProjectProvider(projectFile: vscode.Uri): Promise<dataworkspace.IProjectProvider | undefined> {
|
||||
|
||||
Reference in New Issue
Block a user