diff --git a/find_duplicate_files/find_duplicate_files.py b/find_duplicate_files/find_duplicate_files.py index e6c4380..e1caa06 100644 --- a/find_duplicate_files/find_duplicate_files.py +++ b/find_duplicate_files/find_duplicate_files.py @@ -47,8 +47,9 @@ class find_duplicate_files: if file.is_file(): hash = hashlib.sha256() with open(file.path, 'rb') as file_pointer: - digest = hashlib.file_digest(file_pointer, "sha256") - files[digest.hexdigest()] = file.path + file_content = file_pointer.read() + hash.update(file_content.encode('utf-8')) + files[hash.hexdigest()] = file.path elif file.is_dir(follow_symlinks=False): more_files = self.recursive_scandir( file.path,