Your patch was reviewed before 1.8.14 release but didn�t make it into the 1.8.14 release due to a few missing items (see below).
I've attached a new version of the patch.
Would it be possible for you to create:
1. A test for this new functionality that passes at least on Linux and Windows.
Please take a look at the test/dset.c and test/external.c files and add the new tests where they fit best. Separate test file is also OK, but then you will need to modify
autoconf and CMake related files, and I don�t think it makes sense in this particular case.
I've added tests in test/external.c which test absolute and relative filenames and on windows path-absolute (\dir\path).
The tests work on Linux and Windows.
2. Add the tests to the h5dump, h5ls, h5diff and h5repack tools.
I'm not sure what test to add here, as the functionality of these tools is not affected. (The output of h5dump / h5ls / h5diff should not change in any way, and h5repack should not do anything different.)
3. A short paragraph that describes the issue and the fix for it for the RELEASE.txt file.
I've added that.
4. Enhancements to the HDF5 Reference Manual and User�s Guide entries for H5Pset_external where applicable.
(I'm not sure where the sources for the Reference Manual and the User's Guide are, so I'm not sure who will apply these changes / how I can submit patches for that.)
A paragraph can be added to the Description:
If 'name' is a relative filename, it will be considered relative to the HDF5 file. In this case when the HDF5 file is moved, the external files should be moved along with it.
And to History:
1.8.15 Relative filenames are now considered relative to the HDF5 file, not to the current directory.
To last paragraph of "5.5.4. External Storage Properties":
All referenced external data files must exist before performing raw data I/O on the dataset. This is normally not a problem since those files are being managed directly by the application or indirectly through some other library. However, if the file is transferred from its original context, care must be taken to assure that all the external files are accessible in the new location.
If relative filenames are used, they will be considered relative to the location of the HDF5 file.
Code freeze for 1.8.15 is April 1, 2015. We will need the patches for 1. and 2. before March 25 to tests it on the platforms beyond Linux and Windows.
Documentation patches should be provided by April 15.
relative-external-files-v2.patch (16.4 KB)
On 2015-03-08 22:52, Elena Pourmal wrote: