(path string, rootDirs []string, useCaseSensitiveFileNames bool)
| 223 | } |
| 224 | |
| 225 | func getPathsRelativeToRootDirs(path string, rootDirs []string, useCaseSensitiveFileNames bool) []string { |
| 226 | var results []string |
| 227 | for _, rootDir := range rootDirs { |
| 228 | relativePath := getRelativePathIfInSameVolume(path, rootDir, useCaseSensitiveFileNames) |
| 229 | if !isPathRelativeToParent(relativePath) { |
| 230 | results = append(results, relativePath) |
| 231 | } |
| 232 | } |
| 233 | return results |
| 234 | } |
| 235 | |
| 236 | func isPathRelativeToParent(path string) bool { |
| 237 | return strings.HasPrefix(path, "..") |
no test coverage detected