Skip to content

Commit 7848e56

Browse files
Copilotalexr00
andcommitted
Use isDescendant for cross-platform path comparison in worktree workspace check
Co-authored-by: alexr00 <38270282+alexr00@users.noreply.github.com>
1 parent 6ec5bea commit 7848e56

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/github/pullRequestReviewCommon.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ import { ConvertToDraftReply, PullRequest, ReadyForReviewReply, ReviewType, Subm
1313
import { DEFAULT_DELETION_METHOD, PR_SETTINGS_NAMESPACE, SELECT_LOCAL_BRANCH, SELECT_REMOTE, SELECT_WORKTREE } from '../common/settingKeys';
1414
import { ReviewEvent, TimelineEvent } from '../common/timelineEvent';
1515
import { Schemes } from '../common/uri';
16-
import { formatError } from '../common/utils';
16+
import { formatError, isDescendant } from '../common/utils';
1717
import { IRequestMessage } from '../common/webview';
1818

1919
/**
@@ -34,7 +34,7 @@ function isWorktreeInWorkspace(worktreePath: string): boolean {
3434
if (!workspaceFolders) {
3535
return false;
3636
}
37-
return workspaceFolders.some(folder => folder.uri.fsPath === worktreePath);
37+
return workspaceFolders.some(folder => isDescendant(folder.uri.fsPath, worktreePath));
3838
}
3939

4040
/**

0 commit comments

Comments
 (0)