diff options
Diffstat (limited to 'common/iobuf.c')
| -rw-r--r-- | common/iobuf.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/common/iobuf.c b/common/iobuf.c index 833b90295..770b67c29 100644 --- a/common/iobuf.c +++ b/common/iobuf.c @@ -286,7 +286,6 @@ direct_open (const char *fname, const char *mode, int mode700) return GNUPG_INVALID_FD; da = GENERIC_READ | GENERIC_WRITE; cd = OPEN_EXISTING; - sm = FILE_SHARE_READ | FILE_SHARE_WRITE; } else if (strchr (mode, 'w')) { @@ -294,14 +293,13 @@ direct_open (const char *fname, const char *mode, int mode700) return GNUPG_INVALID_FD; da = GENERIC_WRITE; cd = CREATE_ALWAYS; - sm = FILE_SHARE_WRITE; } else { da = GENERIC_READ; cd = OPEN_EXISTING; - sm = FILE_SHARE_READ; } + sm = FILE_SHARE_READ | FILE_SHARE_WRITE; /* We always use the Unicode version because it supports file names * longer than MAX_PATH. (requires gpgrt 1.45) */ |
