mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-01-22 01:25:38 -05:00
Create project within folder (#11037)
This commit is contained in:
@@ -101,6 +101,12 @@ export class ProjectsController {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a new folder with the project name in the specified location, and places the new .sqlproj inside it
|
||||
* @param newProjName
|
||||
* @param folderUri
|
||||
* @param projectGuid
|
||||
*/
|
||||
public async createNewProject(newProjName: string, folderUri: Uri, projectGuid?: string): Promise<string> {
|
||||
if (projectGuid && !UUID.isUUID(projectGuid)) {
|
||||
throw new Error(`Specified GUID is invalid: '${projectGuid}'`);
|
||||
@@ -119,7 +125,7 @@ export class ProjectsController {
|
||||
newProjFileName += constants.sqlprojExtension;
|
||||
}
|
||||
|
||||
const newProjFilePath = path.join(folderUri.fsPath, newProjFileName);
|
||||
const newProjFilePath = path.join(folderUri.fsPath, path.parse(newProjFileName).name, newProjFileName);
|
||||
|
||||
let fileExists = false;
|
||||
try {
|
||||
|
||||
Reference in New Issue
Block a user