Closed g5t closed 2 months ago
Maybe we can use pathlib
to santize these things? I know they aren't path objects, but it should take care of all these corner cases.
Yes:
PurePosixPath('/entry//entry/instrument').as_posix()
Also takes care of the final slash
Following up on #204 and the fix in #205, I noticed that a path with repeated forward slashes will silently ignore any valid path before the last such
'/'
and treat the rest of the path specification as an absolute path. E.g., a NeXus HDF5 file with anNXinstrument
group at/entry/instrument
opened asfile
will pass the following assert statementthis behavior is contrary to file system paths under unix-like systems which treat repeated path separators as if they were singular.