Add path normalization after join cl_root_path and cl_chroot_path

develop
Mike Hiretsky 14 years ago
parent 256b307839
commit bed13ee486

@ -2293,8 +2293,10 @@ class templateFunction(_error, _shareTemplate, _shareTermsFunction):
if self._chrootDir != '/':
# Изменение директории к базе пакетов
self.basePkgDir = pathJoin(self._chrootDir, self.basePkgDir)
self.basePkgDir = os.path.normpath(self.basePkgDir)
# Базовая директория переноса шаблонов "/mnt/calculate" или "/" и.т.д
self._baseDir=pathJoin(self._chrootDir,self.objVar.Get("cl_root_path"))
self._baseDir = os.path.normpath(self._baseDir)
self._reFunc = re.compile(("%s%s%s")\
%(self.varStart,self._reFunctionText,self.varEnd),re.M)
# Аттрибуты для функции шаблона ini()
@ -3250,6 +3252,7 @@ re.M|re.S)
# Базовая директория переноса шаблонов "/mnt/calculate" или "/" и.т.д
self._baseDir = pathJoin(self.objVar.Get("cl_chroot_path"),
self.objVar.Get("cl_root_path"))
self._baseDir = os.path.normpath(self._baseDir)
# Последняя часть директории шаблона (имя сервиса: samba, mail)
self._servDir = servDir
if self._servDir:
@ -4738,6 +4741,7 @@ class templateClt(scanDirectoryClt, template):
# Базовая директория переноса шаблонов "/mnt/calculate" или "/" и.т.д
self._baseDir = pathJoin(self.objVar.Get("cl_chroot_path"),
self.objVar.Get("cl_root_path"))
self._baseDir = os.path.normpath(self._baseDir)
def applyTemplate(self, path):
"""Применение отдельного .clt шаблона"""

Loading…
Cancel
Save