Skip to content

Commit

Permalink
Use absolute path in hdf5 hash
Browse files Browse the repository at this point in the history
  • Loading branch information
bhazelton committed Apr 17, 2024
1 parent 7335bf1 commit a27a89b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions pyuvdata/hdf5_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -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."""
Expand Down

0 comments on commit a27a89b

Please sign in to comment.