diff --git a/src/hdmf_zarr/backend.py b/src/hdmf_zarr/backend.py index 1636487c..51109946 100644 --- a/src/hdmf_zarr/backend.py +++ b/src/hdmf_zarr/backend.py @@ -755,7 +755,10 @@ def resolve_ref(self, zarr_ref): source_file = str(zarr_ref['source']) # Resolve the path relative to the current file if not self.is_remote(): - source_file = os.path.abspath(os.path.join(self.source, source_file)) + if isinstance(self.source, str) and self.source.startswith(("s3://")): + source_file = self.source + else: + source_file = os.path.abspath(os.path.join(self.source, source_file)) else: # get rid of extra "/" and "./" in the path root and source_file root_path = str(self.path).rstrip("/")