(view: SheetViewMode, path: string)
| 424 | }); |
| 425 | |
| 426 | const ensureFolderPath = (view: SheetViewMode, path: string): string => { |
| 427 | const root = rootPathFor(view); |
| 428 | let p = path |
| 429 | .split("/") |
| 430 | .map((seg) => seg.trim()) |
| 431 | .filter((seg) => seg) |
| 432 | .join("/"); |
| 433 | if (!p) return root; |
| 434 | if (!p.startsWith("/")) p = `/${p}`; |
| 435 | if (!p.startsWith(root)) p = `${root}${p}`; |
| 436 | return p; |
| 437 | }; |
| 438 | |
| 439 | const buildFolderContext = (view: SheetViewMode): FolderContext => { |
| 440 | const rootPath = rootPathFor(view); |
no test coverage detected