diff --git a/find_duplicate_files/find_duplicate_files.py b/find_duplicate_files/find_duplicate_files.py index 3020a12..e6c4380 100644 --- a/find_duplicate_files/find_duplicate_files.py +++ b/find_duplicate_files/find_duplicate_files.py @@ -46,8 +46,8 @@ class find_duplicate_files: if not file.name.startswith('.'): if file.is_file(): hash = hashlib.sha256() - with open(file.path, 'r') as file_pointer: - digest = hashlib.file_digest(f, "sha256") + with open(file.path, 'rb') as file_pointer: + digest = hashlib.file_digest(file_pointer, "sha256") files[digest.hexdigest()] = file.path elif file.is_dir(follow_symlinks=False): more_files = self.recursive_scandir(