Load TLS config files from config path before stash home (#1678)

* Load tls files from config or home directory
* Update README
* Require both ssl files if either present
This commit is contained in:
WithoutPants
2021-08-31 19:37:45 +10:00
committed by GitHub
parent 1774a3600c
commit 709d7ce1cc
8 changed files with 84 additions and 65 deletions

View File

@@ -346,3 +346,14 @@ func IsFsPathCaseSensitive(path string) (bool, error) {
}
return false, fmt.Errorf("can not determine case sensitivity of path %s", path)
}
func FindInPaths(paths []string, baseName string) string {
for _, p := range paths {
filePath := filepath.Join(p, baseName)
if exists, _ := FileExists(filePath); exists {
return filePath
}
}
return ""
}