From 27ea83d2fc1fd251f3c965128898007a834995a4 Mon Sep 17 00:00:00 2001 From: midoks Date: Sun, 5 Dec 2021 18:54:11 +0800 Subject: [PATCH] Update index.py --- plugins/clean/index.py | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/plugins/clean/index.py b/plugins/clean/index.py index dd720d381..5cedc9776 100755 --- a/plugins/clean/index.py +++ b/plugins/clean/index.py @@ -153,6 +153,24 @@ def cleanLog(): if os.path.isdir(abspath): cleanDirLog(abspath) + print("conf clean") + + confFile = getServerDir() + # mw.readFile() + confFile = confFile + "/clean.conf" + clist = mw.readFile(confFile).strip() + clist = clist.split("\n") + + for x in clist: + abspath = x.strip() + if os.path.exists(abspath): + if os.path.isfile(abspath): + cleanFileLog(abspath) + + if os.path.isdir(abspath): + cleanDirLog(abspath) + print("conf clean end") + print("clean end") if __name__ == "__main__":