Update files_api.py

This commit is contained in:
midoks
2022-12-06 20:19:06 +08:00
parent e1abc66179
commit 7a8ef9fe00
+3
View File
@@ -944,10 +944,13 @@ class files_api:
link = ''
if os.path.islink(filename):
link = ' -> ' + os.readlink(filename)
if path:
tmp_path = (path + '/').replace('//', '/')
if tmp_path != '/':
filename = filename.replace(tmp_path, '', 1)
filename = filename.replace('//', '/')
return filename + ';' + size + ';' + mtime + ';' + accept + ';' + user + ';' + link
except Exception as e:
# print(e)