(file string)
| 134 | } |
| 135 | |
| 136 | func stripLeadingSlash(file string) string { |
| 137 | // tar strips the leading '/' and '\' if it's there, so we will too |
| 138 | return strings.TrimLeft(file, `/\`) |
| 139 | } |
| 140 | |
| 141 | // stripPathShortcuts removes any leading or trailing "../" from a given path |
| 142 | func stripPathShortcuts(p string) string { |
no outgoing calls
no test coverage detected