summaryrefslogtreecommitdiffstats
path: root/src/H5FDsubfiling/H5FDioc.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/H5FDsubfiling/H5FDioc.c')
-rw-r--r--src/H5FDsubfiling/H5FDioc.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/H5FDsubfiling/H5FDioc.c b/src/H5FDsubfiling/H5FDioc.c
index 152c045..2fd8b64 100644
--- a/src/H5FDsubfiling/H5FDioc.c
+++ b/src/H5FDsubfiling/H5FDioc.c
@@ -1455,6 +1455,7 @@ H5FD__ioc_del(const char *name, hid_t fapl)
if (mpi_rank == 0) {
int64_t read_n_subfiles = 0;
int32_t n_subfiles = 0;
+ char *prefix_env = NULL;
int num_digits = 0;
if (HDstat(name, &st) < 0)
@@ -1470,9 +1471,13 @@ H5FD__ioc_del(const char *name, hid_t fapl)
H5_SUBFILING_GOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, FAIL,
"can't allocate config file name buffer");
+ /* Check if a prefix has been set for the configuration file name */
+ prefix_env = HDgetenv(H5FD_SUBFILING_CONFIG_FILE_PREFIX);
+
/* TODO: No support for subfile directory prefix currently */
- HDsnprintf(tmp_filename, PATH_MAX, "%s/" H5FD_SUBFILING_CONFIG_FILENAME_TEMPLATE, file_dirname,
- base_filename, (uint64_t)st.st_ino);
+ /* TODO: Possibly try loading config file prefix from file before deleting */
+ HDsnprintf(tmp_filename, PATH_MAX, "%s/" H5FD_SUBFILING_CONFIG_FILENAME_TEMPLATE,
+ prefix_env ? prefix_env : file_dirname, base_filename, (uint64_t)st.st_ino);
if (NULL == (config_file = HDfopen(tmp_filename, "r"))) {
if (ENOENT == errno) {