From 07d9f7a675cd995ba6807e7cbb9217023a80b0ac Mon Sep 17 00:00:00 2001 From: Bryna Hazelton Date: Sat, 23 Mar 2024 07:08:37 -0700 Subject: [PATCH] Use absolute path in hdf5 hash --- pyuvdata/hdf5_utils.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pyuvdata/hdf5_utils.py b/pyuvdata/hdf5_utils.py index 251a76acd..ce04944dd 100644 --- a/pyuvdata/hdf5_utils.py +++ b/pyuvdata/hdf5_utils.py @@ -221,17 +221,17 @@ def __init__(self, path: str | Path | h5py.File | h5py.Group): self.__file = None if isinstance(path, h5py.File): - self.path = Path(path.filename) + self.path = Path(path.filename).resolve() self.__file = path self.__header = path["/Header"] self.__datagrp = path["/Data"] elif isinstance(path, h5py.Group): - self.path = Path(path.file.filename) + self.path = Path(path.file.filename).resolve() self.__file = path.file self.__header = path self.__datagrp = self.__file["/Data"] elif isinstance(path, (str, Path)): - self.path = Path(path) + self.path = Path(path).resolve() def is_open(self) -> bool: """Whether the file is open."""