Merge remote-tracking branch 'origin/main' into feat/nested-git-repos
# Conflicts: # packages/ui/src/components/views/GitView.tsx # packages/ui/src/stores/DOCUMENTATION.md # packages/ui/src/stores/useGitStore.ts
This commit is contained in:
@@ -267,6 +267,27 @@ const resolveWorkspacePathFromContext = async ({ req, targetPath, resolveProject
|
||||
return resolved;
|
||||
}
|
||||
|
||||
// The active project directory is validated with fs.realpath, so the base is
|
||||
// canonical while the client (and the file tree) addresses files under the
|
||||
// user-visible root, which may itself be a symlink. Retry against the raw
|
||||
// directory the client asked for so those paths stay addressable. Symlink
|
||||
// resolution still happens afterwards, and the routes that need canonical
|
||||
// containment re-check it against this base.
|
||||
const requestedBase = resolvedProject.requestedDirectory;
|
||||
if (typeof requestedBase === 'string' && requestedBase && requestedBase !== resolvedProject.directory) {
|
||||
const lexical = resolveWorkspacePath({
|
||||
targetPath,
|
||||
baseDirectory: requestedBase,
|
||||
path,
|
||||
os,
|
||||
normalizeDirectoryPath,
|
||||
openchamberUserConfigRoot,
|
||||
});
|
||||
if (lexical.ok) {
|
||||
return lexical;
|
||||
}
|
||||
}
|
||||
|
||||
return resolveWorkspacePathFromWorktrees({
|
||||
targetPath,
|
||||
baseDirectory: resolvedProject.directory,
|
||||
|
||||
Reference in New Issue
Block a user