(rel: string)
| 134 | * `startsWith('..')` took it for a way out. |
| 135 | */ |
| 136 | export function escapesRoot(rel: string): boolean { |
| 137 | return rel === '..' || rel.startsWith('../') || rel.startsWith('..\\') || path.isAbsolute(rel); |
| 138 | } |
| 139 | |
| 140 | /** |
| 141 | * Whether a filesystem error means nothing is at the path: ENOENT, or ENOTDIR, |
no outgoing calls