(basePath, reqPath string)
| 79 | } |
| 80 | |
| 81 | func JoinBasePath(basePath, reqPath string) (string, error) { |
| 82 | isRelativePath := strings.Contains(reqPath, "..") |
| 83 | reqPath = FixAndCleanPath(reqPath) |
| 84 | if isRelativePath && !strings.Contains(reqPath, "..") { |
| 85 | return "", errs.RelativePath |
| 86 | } |
| 87 | return stdpath.Join(FixAndCleanPath(basePath), reqPath), nil |
| 88 | } |
| 89 | |
| 90 | func GetFullPath(mountPath, path string) string { |
| 91 | return stdpath.Join(GetActualMountPath(mountPath), path) |
no test coverage detected