diff --git a/harbour/ChangeLog b/harbour/ChangeLog index 0f1f2ecd7a..583e22eb6e 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -17,6 +17,12 @@ past entries belonging to author(s): Viktor Szakats. */ +2009-08-31 12:41 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl) + * harbour/source/rdd/dbf1.c + * harbour/source/rdd/sdf1.c + * harbour/source/rdd/delim1.c + * minor extension in default alias settings + 2009-08-30 17:30 UTC-0800 Pritpal Bedi (pritpal@vouchcac.com) * contrib/hbqt/hbqt_slots.cpp ! Completely reworked events management. It now supports multi-threads. diff --git a/harbour/source/rdd/dbf1.c b/harbour/source/rdd/dbf1.c index 0c43a442e9..c662d88e69 100644 --- a/harbour/source/rdd/dbf1.c +++ b/harbour/source/rdd/dbf1.c @@ -3831,7 +3831,10 @@ static HB_ERRCODE hb_dbfOpen( DBFAREAP pArea, LPDBOPENINFO pOpenInfo ) /* Create default alias if necessary */ if( !pOpenInfo->atomAlias && pFileName->szName ) { - hb_strncpyUpperTrim( szAlias, pFileName->szName, sizeof( szAlias ) - 1 ); + const char * szName = strrchr( pFileName->szName, ':' ); + if( szName == NULL ) + szName = pFileName->szName; + hb_strncpyUpperTrim( szAlias, szName, sizeof( szAlias ) - 1 ); pOpenInfo->atomAlias = szAlias; } hb_xfree( pFileName ); diff --git a/harbour/source/rdd/delim1.c b/harbour/source/rdd/delim1.c index a80a62b9d0..7ffde1a424 100644 --- a/harbour/source/rdd/delim1.c +++ b/harbour/source/rdd/delim1.c @@ -1379,7 +1379,10 @@ static HB_ERRCODE hb_delimOpen( DELIMAREAP pArea, LPDBOPENINFO pOpenInfo ) /* Create default alias if necessary */ if( !pOpenInfo->atomAlias && pFileName->szName ) { - hb_strncpyUpperTrim( szAlias, pFileName->szName, sizeof( szAlias ) - 1 ); + const char * szName = strrchr( pFileName->szName, ':' ); + if( szName == NULL ) + szName = pFileName->szName; + hb_strncpyUpperTrim( szAlias, szName, sizeof( szAlias ) - 1 ); pOpenInfo->atomAlias = szAlias; } hb_xfree( pFileName ); diff --git a/harbour/source/rdd/sdf1.c b/harbour/source/rdd/sdf1.c index e633fcb4c5..b97838bb9e 100644 --- a/harbour/source/rdd/sdf1.c +++ b/harbour/source/rdd/sdf1.c @@ -1113,7 +1113,10 @@ static HB_ERRCODE hb_sdfOpen( SDFAREAP pArea, LPDBOPENINFO pOpenInfo ) /* Create default alias if necessary */ if( !pOpenInfo->atomAlias && pFileName->szName ) { - hb_strncpyUpperTrim( szAlias, pFileName->szName, sizeof( szAlias ) - 1 ); + const char * szName = strrchr( pFileName->szName, ':' ); + if( szName == NULL ) + szName = pFileName->szName; + hb_strncpyUpperTrim( szAlias, szName, sizeof( szAlias ) - 1 ); pOpenInfo->atomAlias = szAlias; } hb_xfree( pFileName );