fix for windows path to show in project tree across platforms correctly (#11027)

* fix for windows path to show in project tree across platforms correctly

* allow retrying on project that failed to load

* test for project failed to load case

* Adding platform safe uri for database ref in tree
This commit is contained in:
Udeesha Gautam
2020-06-22 22:37:24 -07:00
committed by GitHub
parent d0b71e116b
commit cfbce96fe2
5 changed files with 60 additions and 3 deletions

View File

@@ -97,6 +97,16 @@ export function getSafeNonWindowsPath(filePath: string): string {
return '"' + filePath + '"';
}
/**
* Get safe relative path for Windows and non-Windows Platform
* This is needed to read sqlproj entried created on SSDT and opened in MAC
* '/' in tree is recognized all platforms but "\\" only by windows
*/
export function getPlatformSafeFileEntryPath(filePath: string): string {
const parts = filePath.split('\\');
return parts.join('/');
}
/**
* Read SQLCMD variables from xmlDoc and return them
* @param xmlDoc xml doc to read SQLCMD variables from. Format must be the same that sqlproj and publish profiles use