From ce63991c9f18ec5aec58b5692dc2831b185db348 Mon Sep 17 00:00:00 2001 From: Ron Koenderink Date: Wed, 29 Nov 2006 12:16:43 +0000 Subject: [PATCH] (ef_open) [_WIN32]: Fix to get a read lock instead of a write lock for EFF_RDONLY and to get a write lock instead of a total file lock for file opened for writing. --- src/lib/common/file.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib/common/file.c b/src/lib/common/file.c index f1a2b805b..464aaf0e7 100644 --- a/src/lib/common/file.c +++ b/src/lib/common/file.c @@ -91,7 +91,7 @@ ef_open(int type, int how) #if defined(_WIN32) oflags |= O_BINARY; if ((fd = sopen(ep->file, oflags, - how & EFF_RDONLY ? SH_DENYWR : SH_DENYRW, + how & EFF_RDONLY ? SH_DENYNO : SH_DENYWR, 0660)) < 0) { logerror("Can't open %s (%s)", ep->file, strerror(errno)); return 0; -- 2.43.0