mirror of
https://github.com/openclaw/openclaw.git
synced 2026-08-12 21:53:00 -06:00
fix(openshell): preserve uploaded workspace root
This commit is contained in:
@@ -738,9 +738,11 @@ class OpenShellSandboxBackendImpl {
|
||||
async ({ dir: tmpDir }) => {
|
||||
// Stage a symlink-free snapshot so upload never dereferences host paths
|
||||
// outside the mirrored workspace tree.
|
||||
const remoteRootName = path.posix.basename(remotePath);
|
||||
const stagedRoot = path.join(tmpDir, remoteRootName);
|
||||
await stageDirectoryContents({
|
||||
sourceDir: localPath,
|
||||
targetDir: tmpDir,
|
||||
targetDir: stagedRoot,
|
||||
});
|
||||
const result = await runOpenShellCli({
|
||||
context: this.params.execContext,
|
||||
@@ -749,8 +751,8 @@ class OpenShellSandboxBackendImpl {
|
||||
"upload",
|
||||
"--no-git-ignore",
|
||||
this.params.execContext.sandboxName,
|
||||
tmpDir,
|
||||
remotePath,
|
||||
stagedRoot,
|
||||
path.posix.dirname(remotePath),
|
||||
],
|
||||
cwd: this.params.createParams.workspaceDir,
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user