mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-01-16 01:25:36 -05:00
Feature/outer paths for project (#11445)
* allow relative paths in project file outside of project folder * Adding some tests * Adding error string to loc strings * Fixed test * fix error message * PR comments and some more fixes
This commit is contained in:
@@ -380,6 +380,13 @@ export class ProjectsController {
|
||||
}
|
||||
|
||||
private getProjectEntry(project: Project, context: BaseProjectTreeItem): ProjectEntry | undefined {
|
||||
const root = context.root as ProjectRootTreeItem;
|
||||
const fileOrFolder = context as FileNode ? context as FileNode : context as FolderNode;
|
||||
|
||||
if (root && fileOrFolder) {
|
||||
// use relative path and not tree paths for files and folder
|
||||
return project.files.find(x => utils.getPlatformSafeFileEntryPath(x.relativePath) === utils.getPlatformSafeFileEntryPath(utils.trimUri(root.fileSystemUri, fileOrFolder.fileSystemUri)));
|
||||
}
|
||||
return project.files.find(x => utils.getPlatformSafeFileEntryPath(x.relativePath) === utils.getPlatformSafeFileEntryPath(utils.trimUri(context.root.uri, context.uri)));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user