From 1a50fd660cc41cda7c78bf0a64fd247a39000a6b Mon Sep 17 00:00:00 2001 From: Mr Chen Date: Tue, 2 Apr 2019 15:13:41 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96rsyncd=E5=90=AF=E5=8A=A8?= =?UTF-8?q?=E9=85=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- plugins/rsyncd/index.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/plugins/rsyncd/index.py b/plugins/rsyncd/index.py index eb4d7016c..7359c4d83 100755 --- a/plugins/rsyncd/index.py +++ b/plugins/rsyncd/index.py @@ -90,7 +90,9 @@ def getLog(): def initConf(): conf_path = appConf() conf = public.readFile(conf_path) - conf = re.sub('^#(.*)', '', conf) + + compile_sub = re.compile('^#(.*)',re.M) + conf = compile_sub.sub('', conf) conf_tpl_path = getPluginDir() + '/conf/rsyncd.conf' if conf.strip() == '': content = public.readFile(conf_tpl_path)