From 03cafb600101c4bc659521b833a1f3a8c56938be Mon Sep 17 00:00:00 2001 From: Mike Buland Date: Tue, 1 Oct 2024 11:45:17 -0700 Subject: More fixes opening files & exclusive mode. --- src/stable/myriad.cpp | 2 +- src/stable/myriad.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'src/stable') diff --git a/src/stable/myriad.cpp b/src/stable/myriad.cpp index f9fcd3e..03cffa9 100644 --- a/src/stable/myriad.cpp +++ b/src/stable/myriad.cpp @@ -84,7 +84,7 @@ Bu::MyriadStream Bu::Myriad::open( Bu::Myriad::StreamId iStream, Bu::MutexLocker l( mhStream ); if( (eMode&Create) ) { - if( !hStream.has( iStream ) ) + if( hStream.has( iStream ) ) { if( (eMode&Exclusive) ) { diff --git a/src/stable/myriad.h b/src/stable/myriad.h index 7f84c2a..6168aa2 100644 --- a/src/stable/myriad.h +++ b/src/stable/myriad.h @@ -45,7 +45,7 @@ namespace Bu Truncate = 0x08, ///< Truncate file if it does exist Append = 0x10, ///< Start writing at end of file //NonBlock = 0x20, ///< Open file in non-blocking mode - Exclusive = 0x44, ///< Create file, if it exists then fail + Exclusive = 0x40, ///< Create file, if it exists then fail // Helpful mixes ReadWrite = 0x03, ///< Open for reading and writing -- cgit v1.2.3