mirror of
https://github.com/Unidata/netcdf-c.git
synced 2025-01-30 16:10:44 +08:00
Incorrect flag is set test for readonly
I think that if the flag `NC_WRITE` *is* set, then the file is not readonly. I think that the test should be negated.
This commit is contained in:
parent
8d5e66ec5f
commit
5435bcbcda
@ -446,7 +446,7 @@ memio_pad_length(ncio* nciop, off_t length)
|
||||
if(nciop == NULL || nciop->pvt == NULL) return NC_EINVAL;
|
||||
memio = (NCMEMIO*)nciop->pvt;
|
||||
|
||||
if(fIsSet(nciop->ioflags,NC_WRITE))
|
||||
if(!fIsSet(nciop->ioflags,NC_WRITE))
|
||||
return EPERM; /* attempt to write readonly file*/
|
||||
if(memio->locked)
|
||||
return NC_EINMEMORY;
|
||||
|
Loading…
Reference in New Issue
Block a user