diff --git a/tests/grib_check_gaussian_grids.sh b/tests/grib_check_gaussian_grids.sh index 21d639291..3abf03942 100755 --- a/tests/grib_check_gaussian_grids.sh +++ b/tests/grib_check_gaussian_grids.sh @@ -112,7 +112,7 @@ set -e [ $status -eq 1 ] ${tools_dir}/grib_check_gaussian_grid -v $data_dir > $tempText -grep -q "not a regular file" $tempText +grep -q "is a directory" $tempText ${tools_dir}/grib_check_gaussian_grid -v $ECCODES_SAMPLES_PATH/GRIB2.tmpl > $tempText grep -q "ignoring" $tempText diff --git a/tools/grib_check_gaussian_grid.cc b/tools/grib_check_gaussian_grid.cc index 9fb0ddc9b..666658490 100644 --- a/tools/grib_check_gaussian_grid.cc +++ b/tools/grib_check_gaussian_grid.cc @@ -69,9 +69,9 @@ static int process_file(const char* filename) grib_handle* h = NULL; FILE* in = NULL; - if (!path_is_regular_file(filename)) { + if (path_is_directory(filename)) { if (verbose) - printf(" WARNING: '%s' not a regular file! Ignoring\n", filename); + printf(" WARNING: '%s' is a directory! Ignoring\n", filename); return GRIB_IO_PROBLEM; }