diff --git a/src/watchdog/utils/dirsnapshot.py b/src/watchdog/utils/dirsnapshot.py index 8b4996941..5a4e1e8eb 100644 --- a/src/watchdog/utils/dirsnapshot.py +++ b/src/watchdog/utils/dirsnapshot.py @@ -255,8 +255,7 @@ def __init__(self, path, recursive=True, def walk(self, root): try: - paths = [os.path.join(root, entry if isinstance(entry, str) else entry.name) - for entry in self.listdir(root)] + paths = [os.path.join(root, entry.name) for entry in self.listdir(root)] except OSError as e: # Directory may have been deleted between finding it in the directory # list of its parent and trying to delete its contents. If this