From aeb79cfe579f18d2226b74f93c7b85e0bad03a9e Mon Sep 17 00:00:00 2001 From: Mr Chen Date: Sun, 9 Jun 2024 13:39:05 +0800 Subject: [PATCH] Update index.py --- plugins/backup_ftp/index.py | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/plugins/backup_ftp/index.py b/plugins/backup_ftp/index.py index 0d8150633..8d48abc24 100755 --- a/plugins/backup_ftp/index.py +++ b/plugins/backup_ftp/index.py @@ -173,7 +173,16 @@ def deleteFile(): return mw.returnJson(True, "删除成功") return mw.returnJson(False, "删除失败") - +def findPathName(path, filename): + f = os.scandir(path) + l = [] + for ff in f: + t = {} + if ff.name.find(filename) > -1: + t['filename'] = path + '/' + ff.name + l.append(t) + return l + def backupAllFunc(stype): os.chdir(mw.getRunDir())