将相对挂载路径转为绝对路径 — 源码 sandbox.rs:264-278
(mounts: List[str], cwd: Path)
| 207 | |
| 208 | |
| 209 | def normalize_mounts(mounts: List[str], cwd: Path) -> List[str]: |
| 210 | """将相对挂载路径转为绝对路径 — 源码 sandbox.rs:264-278""" |
| 211 | result = [] |
| 212 | for mount in mounts: |
| 213 | p = Path(mount) |
| 214 | if p.is_absolute(): |
| 215 | result.append(str(p)) |
| 216 | else: |
| 217 | result.append(str(cwd / p)) |
| 218 | return result |
| 219 | |
| 220 | |
| 221 | def resolve_sandbox_status(request: SandboxRequest, cwd: Path) -> SandboxStatus: |
no test coverage detected