Fixed directories default append. fixed #27

master
Иванов Денис 3 years ago
parent 4483e87285
commit 9afed63d58

@ -793,7 +793,7 @@ class TemplateExecutor:
if template_object.parameters.mirror:
if save_changes:
template_object.save_changes()
return
return self.executor_output
template_object.target_type = None
@ -2394,11 +2394,13 @@ class DirectoryProcessor:
# используя унаследованные параметры и имя самой директории.
# Для того чтобы директория была создана, просто добавляем параметр
# append = join.
directory_parameters.set_parameter({'append': 'join'})
template_text = ''
current_target_path = os.path.join(current_target_path,
directory_name)
if not directory_parameters.append:
directory_parameters.set_parameter({'append': 'join'})
# Выполняем наложение шаблона.
current_target_path = self._execute_template(
current_target_path,

@ -1190,6 +1190,8 @@ class TestDirectoryProcessor:
'/etc/dir_39/file_0'): 'N',
join_paths(CHROOT_PATH,
'/etc/dir_41/file_0'): 'N',
join_paths(CHROOT_PATH,
'/etc/dir_43'): 'N',
join_paths(CHROOT_PATH,
'/etc/dir_43/file_0'): 'N',
join_paths(CHROOT_PATH,

Loading…
Cancel
Save