Skip to content

Commit 2246099

Browse files
Update src/webui/components/deep_research_agent_tab.py
Co-authored-by: cubic-dev-ai[bot] <191113872+cubic-dev-ai[bot]@users.noreply.github.com>
1 parent b8cdbff commit 2246099

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/webui/components/deep_research_agent_tab.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ async def run_deep_research(webui_manager: WebuiManager, components: Dict[Compon
7777
base_save_dir = components.get(save_dir_comp, "./tmp/deep_research").strip()
7878
safe_root_dir = "./tmp/deep_research"
7979
normalized_base_save_dir = os.path.normpath(base_save_dir)
80-
if not normalized_base_save_dir.startswith(os.path.abspath(safe_root_dir)):
80+
if os.path.commonpath([normalized_base_save_dir, os.path.abspath(safe_root_dir)]) != os.path.abspath(safe_root_dir):
8181
logger.warning(f"Unsafe base_save_dir detected: {base_save_dir}. Using default directory.")
8282
normalized_base_save_dir = os.path.abspath(safe_root_dir)
8383
base_save_dir = normalized_base_save_dir

0 commit comments

Comments
 (0)