Clean up ToFileInfo and avoid copy (#13144)
Clean up ToFileInfo and avoid copy (#13144)

Simplify code and remove an iteration of all versions. Remove unneded copy.
minio/minio,donatello/minio,balamurugana/minio,vadmeste/minio,minio/minio,NitishT/minio,NitishT/minio,NitishT/minio,balamurugana/minio,krisis/minio,NitishT/minio,vadmeste/minio,donatello/minio,krisis/minio