diff --git a/web/core/mw.py b/web/core/mw.py index 7d87f970d..cf60c8222 100644 --- a/web/core/mw.py +++ b/web/core/mw.py @@ -542,10 +542,7 @@ def getOsID(): return data[0].strip() # 获取文件权限描述 -def getFileStatsDesc( - filename: str | None = '', - path: str | None = '' -): +def getFileStatsDesc(filename,path): if path == '' or filename == '': return ';;;;;' try: diff --git a/web/utils/file.py b/web/utils/file.py index aa3874079..cf8d04e5d 100644 --- a/web/utils/file.py +++ b/web/utils/file.py @@ -264,7 +264,7 @@ def getAllDirList(path, page=1, size=10, order = '', search=None): for dst_file in plist: if not os.path.exists(dst_file): continue - stat = mw.getFileStatsDesc(filename=dst_file, path=path) + stat = mw.getFileStatsDesc(dst_file, path) if os.path.isdir(dst_file): dirnames.append(stat) else: @@ -312,7 +312,7 @@ def getDirList(path, page=1, size=10, order = '', search=None): if not os.path.exists(abs_file): continue - stats = mw.getFileStatsDesc(filename=abs_file, path=path) + stats = mw.getFileStatsDesc(abs_file, path) if os.path.isdir(abs_file): dirnames.append(stats) else: