Skip to content

Commit

Permalink
fix: Use lowercase path for project label
Browse files Browse the repository at this point in the history
  • Loading branch information
MarkMcCulloh committed Jan 8, 2022
1 parent 058c135 commit 850d58b
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/projen_info.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,15 @@ export class ProjenInfo {
public workspaceFolder: vscode.WorkspaceFolder,
public projectRoot: vscode.Uri
) {
this.label = projectRoot.path.replace(workspaceFolder.uri.path, "");
this.label = projectRoot.path
.toLowerCase()
.replace(workspaceFolder.uri.path.toLowerCase(), "");

if (this.label.startsWith("/")) {
this.label = this.label.slice(1);
}
if (this.label === "") {
this.label = projectRoot.path.slice(
projectRoot.path.lastIndexOf("/") + 1
);
this.label = workspaceFolder.name;
}
this.decorator = new GeneratedFileDecorationProvider();
vscode.window.registerFileDecorationProvider(this.decorator);
Expand Down

0 comments on commit 850d58b

Please sign in to comment.