We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 1f3876b commit 0f8c53dCopy full SHA for 0f8c53d
podaac/merger/path_utils.py
@@ -116,10 +116,10 @@ def collapse_dims(dims: dict) -> dict:
116
root_dims = {p for p in dims if p.count("/") == 1}
117
118
for path, size in dims.items():
119
- dim = "/" + path.split("/")[-1]
120
-
121
- # If dim has a root version and this is NOT that root path → drop it
122
- if dim in root_dims and path != dim:
+ dim_name = path.split("/")[-1]
+ root_dim_path = f"/{dim_name}"
+ # If root-level version exists and this is NOT that root path → drop it
+ if root_dim_path in root_dims and path != root_dim_path:
123
continue
124
result[path] = size
125
0 commit comments