Skip to content

Commit 35e09b3

Browse files
committed
fix: resolve pwd
1 parent e75ef35 commit 35e09b3

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

mhd_utils/__init__.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ def load_raw_data_with_mhd(filename: PathLike) -> Tuple[np.ndarray, Dict[str, An
9393

9494
volume = np.prod(arr[0:dim - 1])
9595

96-
pwd = Path(filename).parents[0]
96+
pwd = Path(filename).parents[0].resolve()
9797
data_file = Path(meta_dict['ElementDataFile'])
9898
if not data_file.is_absolute():
9999
data_file = pwd / data_file
@@ -195,7 +195,7 @@ def write_mhd_file(filename: PathLike, data: np.ndarray, **meta_dict):
195195
write_meta_header(filename, meta_dict)
196196

197197
# Compute absolute path to write to
198-
pwd = Path(filename).parents[0]
198+
pwd = Path(filename).parents[0].resolve()
199199
data_file = Path(meta_dict['ElementDataFile'])
200200
if not data_file.is_absolute():
201201
data_file = pwd / data_file

0 commit comments

Comments
 (0)