diff --git a/src/sbbs3/js_file.c b/src/sbbs3/js_file.c index 03d270414e2fbba3104bd98b37b57ef128b68915..74943233ea394b85f67aac396b34a27c6ea9524d 100644 --- a/src/sbbs3/js_file.c +++ b/src/sbbs3/js_file.c @@ -114,6 +114,9 @@ static int fopenflags(char *mode) flags|=O_RDONLY; } + if(strchr(mode,'e')) + flags|=O_EXCL; + return(flags); } @@ -1490,6 +1493,7 @@ static jsSyncMethodSpec js_file_functions[] = { "<tt>w+</tt> open an empty file for both reading and writing; if the given file exists, its contents are destroyed<br>" "<tt>a+</tt> open for reading and appending<br>" "<tt>b </tt> open in binary (untranslated) mode; translations involving carriage-return and linefeed characters are suppressed (e.g. <tt>r+b</tt>)<br>" + "<tt>e </tt> open a <i>non-shareable</i> file (that must not already exist) for <i>exclusive</i> access<br>" ) ,310 },