fix(frontend): strip duplicate subdirectory prefix in normalizeFsPath to resolve doubled-path bug

This commit is contained in:
2026-06-03 16:42:01 -07:00
parent 6a6fbd87a7
commit f40dbdfb99

View File

@@ -4564,6 +4564,12 @@ function normalizeFsPath(
{ status: 400 }, { status: 400 },
); );
} }
// Prevent doubled subdirectory paths (e.g. getacquired-2-0/getacquired-2-0/)
if (p.startsWith("getacquired-2-0/")) {
p = p.substring("getacquired-2-0/".length);
}
const projectRoot = projectSlug ? `${FS_ROOT}/${projectSlug}` : FS_ROOT; const projectRoot = projectSlug ? `${FS_ROOT}/${projectSlug}` : FS_ROOT;
let abs: string; let abs: string;
if (p.startsWith("/")) { if (p.startsWith("/")) {