Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F153496670
D51491.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
485 B
Referenced Files
None
Subscribers
None
D51491.diff
View Options
diff --git a/lib/libc/db/hash/hash.c b/lib/libc/db/hash/hash.c
--- a/lib/libc/db/hash/hash.c
+++ b/lib/libc/db/hash/hash.c
@@ -120,7 +120,8 @@
if ((hashp->fp = _open(file, flags | O_CLOEXEC, mode)) == -1)
RETURN_ERROR(errno, error0);
new_table = _fstat(hashp->fp, &statbuf) == 0 &&
- statbuf.st_size == 0 && (flags & O_ACCMODE) != O_RDONLY;
+ statbuf.st_size == 0 &&
+ ((flags & O_ACCMODE) != O_RDONLY || (flags & O_CREAT) != 0);
} else
new_table = 1;
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Wed, Apr 22, 11:36 AM (15 h, 47 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
31975166
Default Alt Text
D51491.diff (485 B)
Attached To
Mode
D51491: db/hash.c: Do not return an error when opening a missing database with O_CREAT
Attached
Detach File
Event Timeline
Log In to Comment