mirror of
https://github.com/minio/minio.git
synced 2025-11-26 04:26:12 -05:00
Fix all remaining windows path issues.
This commit is contained in:
@@ -31,6 +31,20 @@ type Metadata struct {
|
||||
ContentType string
|
||||
}
|
||||
|
||||
// sanitizeWindowsPath - sanitize a path
|
||||
func sanitizeWindowsPath(path string) string {
|
||||
return strings.Replace(path, "\\", "/", -1)
|
||||
}
|
||||
|
||||
// sanitizeWindowsPaths - sanitize some windows paths
|
||||
func sanitizeWindowsPaths(paths ...string) []string {
|
||||
var results []string
|
||||
for _, path := range paths {
|
||||
results = append(results, sanitizeWindowsPath(path))
|
||||
}
|
||||
return results
|
||||
}
|
||||
|
||||
// sortUnique sort a slice in lexical order, removing duplicate elements
|
||||
func sortUnique(objects []string) []string {
|
||||
results := []string{}
|
||||
|
||||
Reference in New Issue
Block a user