(i: number)
| 266 | * that the backend rejects as "not a directory". */ |
| 267 | const isWinPath = /^[A-Za-z]:$/.test(segments[0] ?? ""); |
| 268 | const crumbPath = (i: number): string => { |
| 269 | const parts = segments.slice(0, i + 1); |
| 270 | if (isWinPath) return parts.length === 1 ? `${parts[0]}/` : parts.join("/"); |
| 271 | return "/" + parts.join("/"); |
| 272 | }; |
| 273 | |
| 274 | /* Root/drive quick-jump buttons. On Windows the POSIX "/" root is meaningless |
| 275 | * — browsing it returns an empty listing — so drop it and offer drive roots |