mirror of https://github.com/ecmwf/eccodes.git
Tools: Set key 'file' for grib_ls
This commit is contained in:
parent
40747f8703
commit
15685f9922
|
@ -371,10 +371,6 @@ int grib_tool_new_handle_action(grib_runtime_options* options, grib_handle* h)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!json_latlon && options->json_output) {
|
if (!json_latlon && options->json_output) {
|
||||||
if (options->current_infile && options->current_infile->name) {
|
|
||||||
size_t len = strlen(options->current_infile->name);
|
|
||||||
grib_set_string(h, "file", options->current_infile->name, &len);
|
|
||||||
}
|
|
||||||
if (!first_handle && options->handle_count > 1) {
|
if (!first_handle && options->handle_count > 1) {
|
||||||
fprintf(stdout, ",\n");
|
fprintf(stdout, ",\n");
|
||||||
}
|
}
|
||||||
|
@ -383,6 +379,12 @@ int grib_tool_new_handle_action(grib_runtime_options* options, grib_handle* h)
|
||||||
first_handle = 0;
|
first_handle = 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (options->current_infile && options->current_infile->name) {
|
||||||
|
size = strlen(options->current_infile->name);
|
||||||
|
grib_set_string(h, "file", options->current_infile->name, &size);
|
||||||
|
}
|
||||||
|
|
||||||
new_handle = "\n,";
|
new_handle = "\n,";
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue