From 9ef26eb0c1941c16de4b8f24d9672ac7bf33973e Mon Sep 17 00:00:00 2001 From: "Antonio J. Delgado" Date: Wed, 25 Jan 2023 14:43:29 +0200 Subject: [PATCH] add path --- find_duplicate_files/find_duplicate_files.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/find_duplicate_files/find_duplicate_files.py b/find_duplicate_files/find_duplicate_files.py index 03ef789..0837a13 100644 --- a/find_duplicate_files/find_duplicate_files.py +++ b/find_duplicate_files/find_duplicate_files.py @@ -46,7 +46,7 @@ class find_duplicate_files: if not file.name.startswith('.'): if file.is_file(): hash = hashlib.sha256() - with open(file.name, 'r') as file_pointer: + with open(file.path, 'r') as file_pointer: file_content = file_pointer.read() hash.update(file_content) files[hash.hexdigest()] = file.path