From 2c54f8818125c4996bdce6709ee135d3a4b9f971 Mon Sep 17 00:00:00 2001 From: "tao.chen" <93983997+taochen-ct@users.noreply.github.com> Date: Mon, 3 Aug 2026 19:12:40 +0800 Subject: [PATCH] fix: notebook-dir --- runtime/src/runtime/process.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/runtime/src/runtime/process.py b/runtime/src/runtime/process.py index 68d1b10..ccf40d9 100644 --- a/runtime/src/runtime/process.py +++ b/runtime/src/runtime/process.py @@ -160,7 +160,7 @@ def _bump_last_used(record: JupyterProcessRecord) -> None: async def start_workspace(ws_id: str) -> dict: async with get_workspace_lock(ws_id): - workspace_path = WORKSPACES_ROOT / ws_id + workspace_path = (WORKSPACES_ROOT / ws_id).resolve() workspace_path.mkdir(parents=True, exist_ok=True) if ws_id in JUPYTER_PROCESSES: @@ -202,7 +202,7 @@ async def start_workspace(ws_id: str) -> dict: "--allow-root", f"--ServerApp.token={token}", f"--ServerApp.base_url={base_path}", - "--notebook-dir=.", + f"--notebook-dir={workspace_path}", "--ServerApp.terminals_enabled=False", "--NotebookApp.terminals_enabled=False", "--ServerApp.allow_origin=*", @@ -212,7 +212,7 @@ async def start_workspace(ws_id: str) -> dict: ] try: - process, log_file = start_process(cmd, workspace_path) + process, log_file = start_process(cmd, workspace_path.as_posix()) except Exception as e: logger.error(f"Failed to start Jupyter for {ws_id}: {e}") raise HTTPException(