Import spot-fix (#11102)

This commit is contained in:
Benjin Dubishar
2020-06-25 15:37:05 -07:00
committed by GitHub
parent dfa87eda86
commit 770848850d
4 changed files with 7 additions and 7 deletions

View File

@@ -117,7 +117,7 @@ export class ProjectsController {
* @param folderUri
* @param projectGuid
*/
public async createNewProject(newProjName: string, folderUri: Uri, projectGuid?: string): Promise<string> {
public async createNewProject(newProjName: string, folderUri: Uri, makeOwnFolder: boolean, projectGuid?: string): Promise<string> {
if (projectGuid && !UUID.isUUID(projectGuid)) {
throw new Error(`Specified GUID is invalid: '${projectGuid}'`);
}
@@ -135,7 +135,7 @@ export class ProjectsController {
newProjFileName += constants.sqlprojExtension;
}
const newProjFilePath = path.join(folderUri.fsPath, path.parse(newProjFileName).name, newProjFileName);
const newProjFilePath = makeOwnFolder ? path.join(folderUri.fsPath, path.parse(newProjFileName).name, newProjFileName) : path.join(folderUri.fsPath, newProjFileName);
let fileExists = false;
try {
@@ -677,7 +677,7 @@ export class ProjectsController {
// TODO: Check for success
// Create and open new project
const newProjFilePath = await this.createNewProject(newProjName as string, newProjFolderUri as Uri);
const newProjFilePath = await this.createNewProject(newProjName as string, newProjFolderUri as Uri, false);
const project = await this.openProject(Uri.file(newProjFilePath));
//Create a list of all the files and directories to be added to project