mirror of
https://github.com/Unidata/netcdf-c.git
synced 2025-03-19 17:30:27 +08:00
Return EACCES instead of NC_EMETADATA when failing to create an HDF5 file
This commit is contained in:
parent
86eab350c2
commit
4b7817e69e
5
cf
5
cf
@ -144,13 +144,12 @@ FLAGS="$FLAGS --disable-examples"
|
||||
#FLAGS="$FLAGS --enable-dap-long-tests"
|
||||
#FLAGS="$FLAGS --enable-ffio"
|
||||
#FLAGS="$FLAGS --enable-benchmarks"
|
||||
FLAGS="$FLAGS --enable-extra-tests"
|
||||
FLAGS="$FLAGS --enable-logging"
|
||||
#FLAGS="$FLAGS --enable-extra-tests"
|
||||
#FLAGS="$FLAGS --enable-large-file-tests"
|
||||
#FLAGS="$FLAGS --disable-testsets"
|
||||
#FLAGS="$FLAGS --disable-dap-remote-tests"
|
||||
#FLAGS="$FLAGS --enable-doxygen"
|
||||
FLAGS="$FLAGS --enable-logging"
|
||||
#FLAGS="$FLAGS --enable-logging"
|
||||
#FLAGS="$FLAGS --disable-diskless"
|
||||
#FLAGS="$FLAGS --enable-mmap"
|
||||
#FLAGS="$FLAGS --with-udunits"
|
||||
|
@ -23,9 +23,6 @@
|
||||
#endif
|
||||
#include "nc3dispatch.h"
|
||||
|
||||
#if defined(_WIN32) || defined(_WIN64)
|
||||
#include <malloc.h>
|
||||
#endif
|
||||
|
||||
#undef MIN /* system may define MIN somewhere and complain */
|
||||
#define MIN(mm,nn) (((mm) < (nn)) ? (mm) : (nn))
|
||||
|
@ -8,12 +8,14 @@ Copyright 2003, University Corporation for Atmospheric Research. See
|
||||
COPYRIGHT file for copying and redistribution conditions.
|
||||
*/
|
||||
|
||||
#include "nc4internal.h"
|
||||
#include "nc.h"
|
||||
#include <H5DSpublic.h>
|
||||
#include "config.h"
|
||||
#include <errno.h> /* netcdf functions sometimes return system errors */
|
||||
|
||||
#include "nc.h"
|
||||
#include "nc4internal.h"
|
||||
#include "nc4dispatch.h"
|
||||
#include "ncdispatch.h"
|
||||
|
||||
#include <H5DSpublic.h>
|
||||
|
||||
#ifdef USE_HDF4
|
||||
#include <mfhdf.h>
|
||||
@ -326,7 +328,9 @@ nc4_create_file(const char *path, int cmode, MPI_Comm comm, MPI_Info info,
|
||||
|
||||
/* Create the file. */
|
||||
if ((nc4_info->hdfid = H5Fcreate(path, flags, fcpl_id, fapl_id)) < 0)
|
||||
BAIL(NC_EFILEMETA);
|
||||
/*Change the return error from NC_EFILEMETADATA to
|
||||
System error EACCES because that is the more likely problem */
|
||||
BAIL(EACCES);
|
||||
|
||||
/* Open the root group. */
|
||||
if ((nc4_info->root_grp->hdf_grpid = H5Gopen2(nc4_info->hdfid, "/",
|
||||
|
@ -2488,7 +2488,6 @@ nc4_rec_write_metadata(NC_GRP_INFO_T *grp, int bad_coord_order)
|
||||
NC_GRP_INFO_T *child_grp;
|
||||
int found_coord, coord_varid = -1, wrote_coord;
|
||||
|
||||
int last_dimid = -1;
|
||||
int retval;
|
||||
|
||||
assert(grp && grp->name && grp->hdf_grpid);
|
||||
|
Loading…
x
Reference in New Issue
Block a user