From 4e9f1a3685abba645bfae56ccc944909f9e01d95 Mon Sep 17 00:00:00 2001 From: "Alexander S.Kresin" Date: Tue, 7 May 2002 10:15:32 +0000 Subject: [PATCH] 2002-05-07 14:19 UTC+0300 Alexander Kresin --- harbour/ChangeLog | 4 ++++ harbour/source/rdd/dbf1.c | 8 +++++++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/harbour/ChangeLog b/harbour/ChangeLog index ae15d23ae6..c132702a33 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -7,6 +7,10 @@ For example: 2002-12-01 23:12 UTC+0100 Foo Bar */ +2002-05-07 08:00 UTC-0300 Luiz Rafael Culik + * source/rtl/tbrowse.prg + ! Bug fixed reported by Lorenzo Fiorini. + 2002-05-07 14:19 UTC+0300 Alexander Kresin * source/rdd/dbf1.c * Bug fixed in dbfCreate(), related to creating memo file diff --git a/harbour/source/rdd/dbf1.c b/harbour/source/rdd/dbf1.c index 120c2151c7..8f1d5440c4 100644 --- a/harbour/source/rdd/dbf1.c +++ b/harbour/source/rdd/dbf1.c @@ -1588,6 +1588,8 @@ ERRCODE hb_dbfCreate( DBFAREAP pArea, LPDBOPENINFO pCreateInfo ) /* Create memo file */ if( bHasMemo ) { + char *tmp; + ERRCODE result; pArea->szMemoFileName = ( char * ) hb_xgrab( _POSIX_PATH_MAX + 1 ); pFileName = hb_fsFNameSplit( ( char * ) pCreateInfo->abName ); pArea->szMemoFileName[ 0 ] = 0; @@ -1600,8 +1602,11 @@ ERRCODE hb_dbfCreate( DBFAREAP pArea, LPDBOPENINFO pCreateInfo ) strncat( pArea->szMemoFileName, hb_itemGetCPtr( pFileExt ), _POSIX_PATH_MAX - strlen( pArea->szMemoFileName ) ); hb_itemRelease( pFileExt ); + tmp = pCreateInfo->abName; pCreateInfo->abName = ( BYTE * ) pArea->szMemoFileName; - return SELF_CREATEMEMFILE( ( AREAP ) pArea, pCreateInfo ); + result = SELF_CREATEMEMFILE( ( AREAP ) pArea, pCreateInfo ); + pCreateInfo->abName = tmp; + return result; } else return SUCCESS; @@ -1689,6 +1694,7 @@ ERRCODE hb_dbfOpen( DBFAREAP pArea, LPDBOPENINFO pOpenInfo ) pArea->szDataFileName = (char *) hb_xgrab( strlen( (char * ) pOpenInfo->abName)+1 ); strcpy( pArea->szDataFileName, ( char * ) pOpenInfo->abName ); pArea->atomAlias = hb_dynsymGet( ( char * ) pOpenInfo->atomAlias ); + if( ( ( PHB_DYNS ) pArea->atomAlias )->hArea ) { hb_errRT_DBCMD( EG_DUPALIAS, EDBCMD_DUPALIAS, NULL, ( char * ) pOpenInfo->atomAlias );