Definitions path: Core extensions added to end of path implicitly
@@ -494,6 +494,16 @@ grib_context* grib_context_get_default()
default_grib_context.grib_definition_files_path = strdup(buffer);
}
}
+#ifdef ECCODES_DEFINITION_PATH
+ {
+ if (strstr(default_grib_context.grib_definition_files_path, ECCODES_DEFINITION_PATH) == NULL) {
+ char buffer[ECC_PATH_MAXLEN];
+ ecc_snprintf(buffer, ECC_PATH_MAXLEN, "%s%c%s", default_grib_context.grib_definition_files_path,
+ ECC_PATH_DELIMITER_CHAR, ECCODES_DEFINITION_PATH);
+ default_grib_context.grib_definition_files_path = strdup(buffer);
+ }
+ }
+#endif
/* Samples path extra: Added at the head of (i.e. before) existing path */
{
