Explorar o código

HUE-4825 [fb] Filechooser view should return buckets in alphabetical order

Jenny Kim %!s(int64=9) %!d(string=hai) anos
pai
achega
78f65624e3
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      desktop/libs/aws/src/aws/s3/s3fs.py

+ 1 - 1
desktop/libs/aws/src/aws/s3/s3fs.py

@@ -230,7 +230,7 @@ class S3FileSystem(object):
 
     if s3.is_root(path):
       self._init_bucket_cache()
-      return [S3Stat.from_bucket(b) for b in self._bucket_cache.values()]
+      return sorted([S3Stat.from_bucket(b) for b in self._bucket_cache.values()], key=lambda x: x.name)
 
     bucket_name, prefix = s3.parse_uri(path)[:2]
     bucket = self._get_bucket(bucket_name)