From c96529a45c00a4f06c81bb271aaa2e0a804a1e9f Mon Sep 17 00:00:00 2001 From: Viktor Szakats Date: Thu, 1 Apr 2004 07:02:06 +0000 Subject: [PATCH] 2004-04-01 09:09 UTC+0100 Viktor Szakats * source/common/hbffind.c ! Fix for NT4 * source/rdd/dbsort.prg * Fix by Mitja Podgornik --- harbour/ChangeLog | 8 ++++++++ harbour/source/common/hbffind.c | 2 +- harbour/source/rdd/dbsort.prg | 6 ++++++ 3 files changed, 15 insertions(+), 1 deletion(-) diff --git a/harbour/ChangeLog b/harbour/ChangeLog index 39c76149fd..81af57698a 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -8,6 +8,14 @@ 2002-12-01 23:12 UTC+0100 Foo Bar */ +2004-04-01 09:09 UTC+0100 Viktor Szakats + + * source/common/hbffind.c + ! Fix for NT4 + + * source/rdd/dbsort.prg + * Fix by Mitja Podgornik + 2004-04-01 08:49 UTC+0100 Viktor Szakats * bin/bld.bat diff --git a/harbour/source/common/hbffind.c b/harbour/source/common/hbffind.c index 81b12e51e5..181e4f4270 100644 --- a/harbour/source/common/hbffind.c +++ b/harbour/source/common/hbffind.c @@ -609,7 +609,7 @@ static BOOL hb_fsFindNextLow( PHB_FFIND ffind ) bFound = TRUE; } - if( ! bFound ) + if( ! bFound && info->hFindFile != INVALID_HANDLE_VALUE ) { while( FindNextFile( info->hFindFile, &info->pFindFileData ) ) { diff --git a/harbour/source/rdd/dbsort.prg b/harbour/source/rdd/dbsort.prg index 94112fff41..0e688c1b4d 100644 --- a/harbour/source/rdd/dbsort.prg +++ b/harbour/source/rdd/dbsort.prg @@ -63,6 +63,12 @@ FUNCTION __dbSort( cToFileName, aFields, bFor, bWhile, nNext, nRecord, lRest ) RETURN .F. ENDIF + /* Sort returns an empty table if source table contains only one record */ + IF Lastrec() == 1 + COPY TO ( cToFileName ) + RETURN .T. + ENDIF + BEGIN SEQUENCE dbCreate( cToFileName, aStruct,, .T., "" )