|
|
@ -5350,6 +5350,7 @@ gettext -d cl_template "$*"
|
|
|
|
if HParams.DirectoryLink in objHead.params:
|
|
|
|
if HParams.DirectoryLink in objHead.params:
|
|
|
|
templateFile = objHead.params[HParams.DirectoryLink]
|
|
|
|
templateFile = objHead.params[HParams.DirectoryLink]
|
|
|
|
templateFile = pathJoin(self._baseDir, templateFile)
|
|
|
|
templateFile = pathJoin(self._baseDir, templateFile)
|
|
|
|
|
|
|
|
#TODO relative path for dirs?
|
|
|
|
if not os.path.isdir(templateFile):
|
|
|
|
if not os.path.isdir(templateFile):
|
|
|
|
self.setError(_("Source path %s is not a directory")
|
|
|
|
self.setError(_("Source path %s is not a directory")
|
|
|
|
% templateFile)
|
|
|
|
% templateFile)
|
|
|
@ -5706,7 +5707,13 @@ gettext -d cl_template "$*"
|
|
|
|
# Получаем директорию пользователя
|
|
|
|
# Получаем директорию пользователя
|
|
|
|
templateFile = os.path.join(
|
|
|
|
templateFile = os.path.join(
|
|
|
|
self.homeDir, templateFile.partition("/")[2], "")[:-1]
|
|
|
|
self.homeDir, templateFile.partition("/")[2], "")[:-1]
|
|
|
|
templateFile = pathJoin(self._baseDir, templateFile)
|
|
|
|
if templateFile and templateFile[0] == "/":
|
|
|
|
|
|
|
|
templateFile = pathJoin(self._baseDir, templateFile)
|
|
|
|
|
|
|
|
else:
|
|
|
|
|
|
|
|
#relative path
|
|
|
|
|
|
|
|
templateFile = pathJoin(os.path.dirname(pathOldFile), templateFile)
|
|
|
|
|
|
|
|
templateFile = pathJoin(self._baseDir, templateFile)
|
|
|
|
|
|
|
|
templateFile = os.path.abspath(templateFile)
|
|
|
|
if (not os.path.exists(templateFile) or
|
|
|
|
if (not os.path.exists(templateFile) or
|
|
|
|
not objHeadNew.params[HParams.Link]):
|
|
|
|
not objHeadNew.params[HParams.Link]):
|
|
|
|
if os.path.exists(pathOldFile):
|
|
|
|
if os.path.exists(pathOldFile):
|
|
|
@ -5730,7 +5737,14 @@ gettext -d cl_template "$*"
|
|
|
|
# Получаем директорию пользователя
|
|
|
|
# Получаем директорию пользователя
|
|
|
|
templateFile = os.path.join(
|
|
|
|
templateFile = os.path.join(
|
|
|
|
self.homeDir, templateFile.partition("/")[2], "")[:-1]
|
|
|
|
self.homeDir, templateFile.partition("/")[2], "")[:-1]
|
|
|
|
templateFile = pathJoin(self._baseDir, templateFile)
|
|
|
|
|
|
|
|
|
|
|
|
if templateFile and templateFile[0] == "/":
|
|
|
|
|
|
|
|
templateFile = pathJoin(self._baseDir, templateFile)
|
|
|
|
|
|
|
|
else:
|
|
|
|
|
|
|
|
#relative path
|
|
|
|
|
|
|
|
templateFile = pathJoin(os.path.dirname(pathOldFile), templateFile)
|
|
|
|
|
|
|
|
templateFile = pathJoin(self._baseDir, templateFile)
|
|
|
|
|
|
|
|
templateFile = os.path.abspath(templateFile)
|
|
|
|
foundTemplateFile = os.path.exists(templateFile)
|
|
|
|
foundTemplateFile = os.path.exists(templateFile)
|
|
|
|
buff = None
|
|
|
|
buff = None
|
|
|
|
buff_is_unicode = False
|
|
|
|
buff_is_unicode = False
|
|
|
|