mirror of
https://github.com/pgsty/minio.git
synced 2026-08-09 15:53:28 +03:00
fs: Filter out valid paths and volnames. (#1321)
This commit is contained in:
@@ -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