Skip to content

Commit ea92ba9

Browse files
committed
Adds protection against missing file names - related to #568
1 parent 6a7b478 commit ea92ba9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/git/gitUri.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -329,7 +329,7 @@ export class GitUri extends ((Uri as any) as UriEx) {
329329

330330
const normalizedRepoPath = Strings.normalizePath(repoPath);
331331

332-
if (normalizedFileName.startsWith(normalizedRepoPath)) return normalizedFileName;
332+
if (!normalizedFileName || normalizedFileName.startsWith(normalizedRepoPath)) return normalizedFileName;
333333
return Strings.normalizePath(paths.join(normalizedRepoPath, normalizedFileName));
334334
}
335335

0 commit comments

Comments
 (0)