Skip to content
  • Brian Panneton's avatar
    BUG: Fixed resolving file names with protocol added · 294c383c
    Brian Panneton authored
    The bug appears when trying to use a filename given as:
    file:///path/to/xmf/file.xmf and the xmf contains a reference to an h5 file.
    
    - When writing you will end up with a file called 'file:' which contains
    random data.
    - When reading, libxml2 has no problem opening the xml file however
    getRealPath() returns the wrong path for the h5 file. If you try to
    use file.xmf from the to directory (ie: read("to/xmf/file.xmf")) the
    h5 file will be loaded from 'to/file.h5'.
    
    To correct the issue, we strip out the unwanted scheme and other stuff
    in the URI and just use the path. (libxml has functions for this)
    294c383c