reverted link changes due to builder bugs

master 3.7.2.18
idziubenko 2 years ago
parent 57d328aa01
commit a8e657dae8

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

Loading…
Cancel
Save