aboutsummaryrefslogtreecommitdiffstats
path: root/lib/rfsv16.cc
diff options
context:
space:
mode:
Diffstat (limited to 'lib/rfsv16.cc')
-rw-r--r--lib/rfsv16.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/rfsv16.cc b/lib/rfsv16.cc
index 9420b57..eb5b91f 100644
--- a/lib/rfsv16.cc
+++ b/lib/rfsv16.cc
@@ -279,7 +279,8 @@ opMode(long mode)
ret |= (mode & PSI_O_TRUNC) ? P_FREPLACE : 0;
ret |= (mode & PSI_O_CREAT) ? P_FCREATE : 0;
ret |= (mode & PSI_O_APPEND) ? P_FAPPEND : 0;
- ret |= (mode & PSI_O_EXCL) ? 0 : P_FSHARE;
+ if (mode & 03) == PSI_O_RDONLY)
+ ret |= (mode & PSI_O_EXCL) ? 0 : P_FSHARE;
return ret;
}