Tools: Set key 'file' for grib_get

This commit is contained in:
Shahram Najm 2022-12-16 17:14:24 +00:00
parent d7df5381d9
commit a34bb5bd24
1 changed files with 5 additions and 0 deletions

View File

@ -204,6 +204,11 @@ int grib_tool_new_handle_action(grib_runtime_options* options, grib_handle* h)
}
}
if (options->current_infile && options->current_infile->name) {
size = strlen(options->current_infile->name);
grib_set_string(h, "file", options->current_infile->name, &size);
}
return 0;
}