fix(openshell): preserve uploaded workspace root · openclaw/openclaw@d1a7d45
vincentkoc
·
2026-06-24
·
via Recent Commits to openclaw:main
| Original file line number | Diff line number | Diff line change |
|---|
@@ -738,9 +738,11 @@ class OpenShellSandboxBackendImpl {
|
738 | 738 | async ({ dir: tmpDir }) => { |
739 | 739 | // Stage a symlink-free snapshot so upload never dereferences host paths |
740 | 740 | // outside the mirrored workspace tree. |
| 741 | +const remoteRootName = path.posix.basename(remotePath); |
| 742 | +const stagedRoot = path.join(tmpDir, remoteRootName); |
741 | 743 | await stageDirectoryContents({ |
742 | 744 | sourceDir: localPath, |
743 | | -targetDir: tmpDir, |
| 745 | +targetDir: stagedRoot, |
744 | 746 | }); |
745 | 747 | const result = await runOpenShellCli({ |
746 | 748 | context: this.params.execContext, |
@@ -749,8 +751,8 @@ class OpenShellSandboxBackendImpl {
|
749 | 751 | "upload", |
750 | 752 | "--no-git-ignore", |
751 | 753 | this.params.execContext.sandboxName, |
752 | | -tmpDir, |
753 | | -remotePath, |
| 754 | +stagedRoot, |
| 755 | +path.posix.dirname(remotePath), |
754 | 756 | ], |
755 | 757 | cwd: this.params.createParams.workspaceDir, |
756 | 758 | }); |
|
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。