Update app_utils.py
Browse files- app_utils.py +1 -1
app_utils.py
CHANGED
@@ -177,7 +177,7 @@ def list_oss_files(folder_path: str) -> List[str]:
|
|
177 |
for obj in oss2.ObjectIterator(bucket, prefix=folder_path):
|
178 |
if not obj.key.endswith('/'): # 排除目录本身
|
179 |
files.append(obj.key)
|
180 |
-
return sorted(files)
|
181 |
|
182 |
def download_oss_file(oss_path: str, local_path: str):
|
183 |
"""从OSS下载文件到本地"""
|
|
|
177 |
for obj in oss2.ObjectIterator(bucket, prefix=folder_path):
|
178 |
if not obj.key.endswith('/'): # 排除目录本身
|
179 |
files.append(obj.key)
|
180 |
+
return sorted(files, key=lambda x: os.path.splitext(x)[0])
|
181 |
|
182 |
def download_oss_file(oss_path: str, local_path: str):
|
183 |
"""从OSS下载文件到本地"""
|