Skip to content
Snippets Groups Projects
Commit c15e1f41 authored by Jean-Romain Garnier's avatar Jean-Romain Garnier Committed by Chris Lamb
Browse files

Prevent an issue where (for example) LibarchiveMember's has_same_content...

Prevent an issue where (for example) LibarchiveMember's has_same_content method is called regardless of the actual type of file.

Signed-off-by: Chris Lamb's avatarChris Lamb <lamby@debian.org>
parent e410ca9e
No related branches found
No related tags found
No related merge requests found
Pipeline #141811 passed
......@@ -96,6 +96,11 @@ def compare_files(file1, file2, source=None, diff_content_only=False):
if any_excluded(file1.name, file2.name):
return None
# Specialize the files first so "has_same_content_as" can be overridden
# by subclasses
specialize(file1)
specialize(file2)
force_details = Config().force_details
with profile("has_same_content_as", file1):
has_same_content = file1.has_same_content_as(file2)
......@@ -111,9 +116,6 @@ def compare_files(file1, file2, source=None, diff_content_only=False):
elif diff_content_only:
return Difference(None, file1.name, file2.name, comment="Files differ")
specialize(file1)
specialize(file2)
call_difftool(file1, file2)
if isinstance(file1, MissingFile):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment