pull/632/head
Mr Chen 6 months ago
parent b007010912
commit 1b007460de
  1. 5
      web/core/mw.py
  2. 4
      web/utils/file.py

@ -542,10 +542,7 @@ def getOsID():
return data[0].strip() return data[0].strip()
# 获取文件权限描述 # 获取文件权限描述
def getFileStatsDesc( def getFileStatsDesc(filename,path):
filename: str | None = '',
path: str | None = ''
):
if path == '' or filename == '': if path == '' or filename == '':
return ';;;;;' return ';;;;;'
try: try:

@ -264,7 +264,7 @@ def getAllDirList(path, page=1, size=10, order = '', search=None):
for dst_file in plist: for dst_file in plist:
if not os.path.exists(dst_file): if not os.path.exists(dst_file):
continue continue
stat = mw.getFileStatsDesc(filename=dst_file, path=path) stat = mw.getFileStatsDesc(dst_file, path)
if os.path.isdir(dst_file): if os.path.isdir(dst_file):
dirnames.append(stat) dirnames.append(stat)
else: else:
@ -312,7 +312,7 @@ def getDirList(path, page=1, size=10, order = '', search=None):
if not os.path.exists(abs_file): if not os.path.exists(abs_file):
continue continue
stats = mw.getFileStatsDesc(filename=abs_file, path=path) stats = mw.getFileStatsDesc(abs_file, path)
if os.path.isdir(abs_file): if os.path.isdir(abs_file):
dirnames.append(stats) dirnames.append(stats)
else: else:

Loading…
Cancel
Save