From 996407054e03cbd011aae1c7260fbd8bc6c9b3fc Mon Sep 17 00:00:00 2001 From: "Alexander S.Kresin" Date: Fri, 18 May 2001 05:55:41 +0000 Subject: [PATCH] 2001-05-18 09:50 GMT+3 Alexander Kresin --- harbour/ChangeLog | 8 ++++++++ harbour/source/rdd/dbfntx/dbfntx1.c | 4 +++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/harbour/ChangeLog b/harbour/ChangeLog index 49f4e31503..a5b2050d7c 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -1,3 +1,11 @@ +2001-05-18 09:50 GMT+3 Alexander Kresin + * source/rdd/dbfntx/dbfntx1.c + * indexes now are opened with FO_READWRITE regardless of + readonly mode on/off to allow locking. + They are opened with FO_READ mode only if exclusive and readonly are set. + ( Before index file couldn't be locked while moving through it + in shared readonly mode ). + 2001-05-17 13:25 GMT+3 Alexander Kresin * source/rdd/dbfntx/dbfntx1.c * bugs fixed, reported by John M. S. Chiang, related to appending of diff --git a/harbour/source/rdd/dbfntx/dbfntx1.c b/harbour/source/rdd/dbfntx/dbfntx1.c index 3e2a64e2c2..7fed559c4b 100644 --- a/harbour/source/rdd/dbfntx/dbfntx1.c +++ b/harbour/source/rdd/dbfntx/dbfntx1.c @@ -2638,7 +2638,9 @@ static ERRCODE ntxOrderListAdd( NTXAREAP pArea, LPDBORDERINFO pOrderInfo ) } pIndex = hb_ntxIndexNew( pArea ); - uiFlags = pArea->fReadonly ? FO_READ : FO_READWRITE; + /* Index file could be opened with FO_READ only in exclusive readonly mode + to allow locking in other modes */ + uiFlags = !pArea->fShared && pArea->fReadonly ? FO_READ : FO_READWRITE; uiFlags |= pArea->fShared ? FO_DENYNONE : FO_EXCLUSIVE; do