Skip to content

Commit fe73c84

Browse files
Copilotalexr00
andcommitted
Use case-insensitive path comparison for isWorktreeInWorkspace on Windows
Co-authored-by: alexr00 <38270282+alexr00@users.noreply.github.com>
1 parent 7666cb3 commit fe73c84

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/github/pullRequestReviewCommon.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -295,7 +295,11 @@ export namespace PullRequestReviewCommon {
295295
};
296296

297297
function isWorktreeInWorkspace(worktreePath: string): boolean {
298-
return !!vscode.workspace.workspaceFolders?.some(folder => folder.uri.fsPath === worktreePath);
298+
return !!vscode.workspace.workspaceFolders?.some(folder => {
299+
const folderPath = folder.uri.fsPath;
300+
return folderPath === worktreePath ||
301+
(process.platform === 'win32' && folderPath.toLowerCase() === worktreePath.toLowerCase());
302+
});
299303
}
300304

301305
export async function deleteBranch(folderRepositoryManager: FolderRepositoryManager, item: PullRequestModel): Promise<{ isReply: boolean, message: any }> {

0 commit comments

Comments
 (0)