removing links was fixed #45

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

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 75 B

Loading…
Cancel
Save