update sql projects test (#17987)

This commit is contained in:
Kim Santiago
2022-01-05 10:03:24 -08:00
committed by GitHub
parent b2c919e054
commit e11b1ed2a3
2 changed files with 6 additions and 5 deletions

View File

@@ -660,6 +660,8 @@ export class ProjectsController {
if (root && fileOrFolder) {
// use relative path and not tree paths for files and folder
const allFileEntries = project.files.concat(project.preDeployScripts).concat(project.postDeployScripts).concat(project.noneDeployScripts);
// trim trailing slash since folders with and without a trailing slash are allowed in a sqlproj
const trimmedUri = utils.trimChars(utils.getPlatformSafeFileEntryPath(utils.trimUri(root.fileSystemUri, fileOrFolder.fileSystemUri)), '/');
return allFileEntries.find(x => utils.trimChars(utils.getPlatformSafeFileEntryPath(x.relativePath), '/') === trimmedUri);
}