Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion upath/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -785,7 +785,7 @@ class UPath(_UPathMixin, WritablePath, ReadablePath):
if TYPE_CHECKING: # noqa: C901
_chain: Chain
_chain_parser: FSSpecChainParser
_fs_cached: bool
_fs_cached: AbstractFileSystem
_raw_urlpaths: Sequence[JoinablePathLike]
_relative_base: str | None

Expand Down Expand Up @@ -965,6 +965,8 @@ def with_segments(self, *pathsegments: JoinablePathLike) -> Self:
protocol=self._protocol,
**self._storage_options,
)
if hasattr(self, "_fs_cached"):
new_instance._fs_cached = self._fs_cached

if is_relative:
new_instance._relative_base = self._relative_base
Expand Down
Loading