liuyiyang commited on
Commit
460372d
·
verified ·
1 Parent(s): 4700be1

Update app_utils.py

Browse files
Files changed (1) hide show
  1. 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下载文件到本地"""