diff --git a/pym/calculate/lib/cl_template.py b/pym/calculate/lib/cl_template.py index cb0228c..6bf7804 100644 --- a/pym/calculate/lib/cl_template.py +++ b/pym/calculate/lib/cl_template.py @@ -2960,6 +2960,10 @@ class templateFunction(_error, _warning, _shareTemplate, _shareTermsFunction): reg = re.compile(regpattern) except re.error as e: self.raiseErrTemplate(_("Wrong regular expression")) + if fname[0] == "~": + # Получаем директорию пользователя + fname = os.path.join(self.homeDir, + fname.partition("/")[2],"")[:-1] fname = pathJoin(self.objVar.Get('cl_chroot_path'),fname) fileContent = readFile(fname) match_data = reg.search(fileContent)