diff --git a/singer_sdk/contrib/filesystem/tap.py b/singer_sdk/contrib/filesystem/tap.py index cce52f409..8584a6ca8 100644 --- a/singer_sdk/contrib/filesystem/tap.py +++ b/singer_sdk/contrib/filesystem/tap.py @@ -174,12 +174,12 @@ def discover_streams(self) -> list: return [ self.default_stream_class( tap=self, - name=file_path_to_stream_name(member), - filepaths=[os.path.join(path, member)], # noqa: PTH118 + name=file_path_to_stream_name(member["name"]), + filepaths=[os.path.join(path, member["name"])], # noqa: PTH118 filesystem=self.fs, ) - for member in self.fs.listdir(path, detail=False) - if member.endswith(self.valid_extensions) + for member in self.fs.listdir(path) + if member["name"].endswith(self.valid_extensions) ] # Merge @@ -188,9 +188,9 @@ def discover_streams(self) -> list: tap=self, name=self.config["stream_name"], filepaths=[ - os.path.join(path, member) # noqa: PTH118 - for member in self.fs.listdir(path, detail=False) - if member.endswith(self.valid_extensions) + os.path.join(path, member["name"]) # noqa: PTH118 + for member in self.fs.listdir(path) + if member["name"].endswith(self.valid_extensions) ], filesystem=self.fs, )