mirror of
https://github.com/minio/minio.git
synced 2026-11-23 15:16:48 +00:00
fs: Filter out valid paths and volnames. (#1321)
This commit is contained in:
1 parent
b2ec7da9f9
commit
33633fd15d
3 files changed
+3
-3
No files matched your search
@@ -143,7 +143,7 @@ func removeDuplicateVols(vols []VolInfo) []VolInfo {
|
||||
func getAllUniqueVols(dirPath string) ([]VolInfo, error) {
|
||||
volumeFn := func(dirent fsDirent) bool {
|
||||
// Return all directories.
|
||||
return dirent.IsDir()
|
||||
return dirent.IsDir() && isValidVolname(dirent.name)
|
||||
}
|
||||
namesOnly := false // Returned dirent names are absolute.
|
||||
dirents, err := scandir(dirPath, volumeFn, namesOnly)
|
||||
|
||||
Reference in new issue
Block a user