Don't allow duplicate file/folder entries to be added to sql projects (#15104)

* don't allow adding the same file or folder to the sqlproj if it has already been added

* add a couple more checks in test

* toLowerCase when comparing
This commit is contained in:
Kim Santiago
2021-04-13 16:08:43 -07:00
committed by GitHub
parent 0ce57eb9b3
commit b7ea1c1bf3
3 changed files with 34 additions and 1 deletions

View File

@@ -198,6 +198,8 @@ export function fileOrFolderDoesNotExist(name: string) { return localize('fileOr
export function cannotResolvePath(path: string) { return localize('cannotResolvePath', "Cannot resolve path {0}", path); }
export function fileAlreadyExists(filename: string) { return localize('fileAlreadyExists', "A file with the name '{0}' already exists on disk at this location. Please choose another name.", filename); }
export function folderAlreadyExists(filename: string) { return localize('folderAlreadyExists', "A folder with the name '{0}' already exists on disk at this location. Please choose another name.", filename); }
export function fileAlreadyAddedToProject(filepath: string) { return localize('fileAlreadyAddedToProject', "A file with the path '{0}' has already been added to the project", filepath); }
export function folderAlreadyAddedToProject(folderpath: string) { return localize('folderAlreadyAddedToProject', "A folder with the path '{0}' has already been added to the project", folderpath); }
export function invalidInput(input: string) { return localize('invalidInput', "Invalid input: {0}", input); }
export function unableToCreatePublishConnection(input: string) { return localize('unableToCreatePublishConnection', "Unable to construct connection: {0}", input); }
export function circularProjectReference(project1: string, project2: string) { return localize('cicularProjectReference', "Circular reference from project {0} to project {1}", project1, project2); }