* VFS paths store each segment percent-encoded (see encodeVfsSegment), so * a read on "My Report.txt" arrives as "files/My%20Report.txt". Decode for * display so the user sees the real file name. Falls back to the raw segment when * it is not valid encoding (e.g. a literal "%" that was ne
(segment: string)
| 88 | * it is not valid encoding (e.g. a literal "%" that was never encoded). |
| 89 | */ |
| 90 | function decodeVfsSegmentSafe(segment: string): string { |
| 91 | try { |
| 92 | return decodeVfsSegment(segment) |
| 93 | } catch { |
| 94 | return segment |
| 95 | } |
| 96 | } |
| 97 | |
| 98 | function describeReadTarget(path: string | undefined): string | undefined { |
| 99 | if (!path) return undefined |
nothing calls this directly
no test coverage detected