Closed RemiLehe closed 6 years ago
Thanks for catching this!
I think imposing the final /
makes implementations easier (good!) while cluttering the standard with details a little. A path join operation is in principle the logical way to implement it (available in Python and modern C++) which then would be agnostic. Nevertheless some very rudimentary languages might not have such high-level functionality.
The example currently shows a trailing /
and I think it might make things indeed easier for implementations which I favor for the community.
Let's discuss this today!
Since "//" is equivalent to "/" in a path one can always use
A+"/"+B
if a join function is not available.
That's right :) But maybe - nah, it's kind of a hack :-) and won't work if your file format is a bit... special... (ADIOS1 paths are only maps with string keys, don't let us stress those)
When
meshesPath
does not have a trailing slash (/
), then the code crashes.This is essentially because the code in
check_h5.py
forms paths by using+
on strings, instead ofos.path.join
.In fact, I think that the standard is somewhat unclear on whether
meshesPath
should end with a/
. @ax3l : What do you think?/
, then the validator should return at least a printed message indicating that themeshesPath
is not correctly formed before crashing.os.path.join
.