removing links was fixed #45

master
Иванов Денис 3 years ago
parent cb911aa803
commit ea037c3a26

@ -328,7 +328,7 @@ class TemplateWrapper:
elif self.target_is_link: elif self.target_is_link:
if self.parameters.force: if self.parameters.force:
self.remove_original = True self.remove_original = True
else: elif not self.parameters.append == "remove":
try: try:
link_source = check_directory_link( link_source = check_directory_link(
self.target_path, self.target_path,
@ -355,14 +355,15 @@ class TemplateWrapper:
raise TemplateExecutorError("files error: {}". raise TemplateExecutorError("files error: {}".
format(str(error))) format(str(error)))
elif self.target_is_link: elif self.target_is_link:
if self.target_type == DIR: if not self.parameters.append == "remove":
raise TemplateTypeConflict("the target file is a link to a" if self.target_type == DIR:
" directory while the template" raise TemplateTypeConflict("the target file is a link"
" is a file") " to a directory while the"
else: " template is a file")
raise TemplateTypeConflict("the target file is a link to" else:
" a file while the template" raise TemplateTypeConflict("the target file is a link"
" is a file") " to a file while the"
" template is a file")
elif self.target_type == DIR: elif self.target_type == DIR:
raise TemplateTypeConflict("the target file is a directory" raise TemplateTypeConflict("the target file is a directory"
" while the template is a file") " while the template is a file")

Binary file not shown.

After

Width:  |  Height:  |  Size: 75 B

Loading…
Cancel
Save