output as comments

This commit is contained in:
Antonio J. Delgado 2023-01-26 09:07:24 +02:00
parent 4d9f0e58a4
commit 251c3078e0

View file

@ -35,9 +35,9 @@ class find_duplicate_files:
self._init_db_cache() self._init_db_cache()
first_files = self.recursive_scandir(self.first_directory) first_files = self.recursive_scandir(self.first_directory)
self._log.debug(f"Found {len(first_files)} files in first directory '{first_directory}'") self._log.debug(f"# Found {len(first_files)} files in first directory '{first_directory}'")
second_files = self.recursive_scandir(self.second_directory) second_files = self.recursive_scandir(self.second_directory)
self._log.debug(f"Found {len(second_files)} files in second directory '{second_directory}'") self._log.debug(f"# Found {len(second_files)} files in second directory '{second_directory}'")
total = len(first_files) total = len(first_files)
count = 0 count = 0
@ -92,7 +92,7 @@ class find_duplicate_files:
try: try:
for file in os.scandir(path): for file in os.scandir(path):
if self.limit > 0 and len(files) > self.limit: if self.limit > 0 and len(files) > self.limit:
self._log.debug(f"Limit of {self.limit} passed ({len(files)})") self._log.debug(f"# Limit of {self.limit} passed ({len(files)})")
break break
if not file.name.startswith('.'): if not file.name.startswith('.'):
if not self._test_exclude(file.path): if not self._test_exclude(file.path):
@ -114,8 +114,8 @@ class find_duplicate_files:
if more_files: if more_files:
files = { **files, **more_files } files = { **files, **more_files }
except PermissionError as error: except PermissionError as error:
self._log.warning(f"Permission denied accessing folder '{path}'") self._log.warning(f"# Permission denied accessing folder '{path}'")
self._log.debug(f"Found {len(files)} files in '{path}'. Cache contains {self._cache_size()} records.") self._log.debug(f"# Found {len(files)} files in '{path}'. Cache contains {self._cache_size()} records.")
return files return files
def _init_log(self): def _init_log(self):