diff options
-rw-r--r-- | db/hash/hash.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/db/hash/hash.c b/db/hash/hash.c index 0db7b32..1f26c7e 100644 --- a/db/hash/hash.c +++ b/db/hash/hash.c @@ -189,7 +189,7 @@ __hash_open(file, flags, mode, info, dflags) __buf_init(hashp, DEF_BUFSIZE); hashp->new_file = new_table; - hashp->save_file = file && (hashp->flags & O_RDWR); + hashp->save_file = file && (hashp->flags & O_ACCMODE) != O_RDONLY; hashp->cbucket = -1; if (!(dbp = (DB *)malloc(sizeof(DB)))) { save_errno = errno; |