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

@@ -74,7 +74,8 @@ export class Project {
throw new Error(constants.invalidDatabaseReference);
}
this.databaseReferences.push(path.parse(filepath).name);
const platformSafeFilePath = utils.getPlatformSafeFileEntryPath(filepath);
this.databaseReferences.push(path.parse(platformSafeFilePath).name);
}
}
}
@@ -250,7 +251,8 @@ export class Project {
}
public createProjectEntry(relativePath: string, entryType: EntryType): ProjectEntry {
return new ProjectEntry(Uri.file(path.join(this.projectFolderPath, relativePath)), relativePath, entryType);
let platformSafeRelativePath = utils.getPlatformSafeFileEntryPath(relativePath);
return new ProjectEntry(Uri.file(path.join(this.projectFolderPath, platformSafeRelativePath)), relativePath, entryType);
}
private findOrCreateItemGroup(containedTag?: string): any {