2011-02-21 18:25 UTC+0100 Viktor Szakats (harbour.01 syenar.hu)

* src/rtl/fscopy.c
    ! Fixed missing header in prev.
    ! Fixed to check empty value of parameters properly.
This commit is contained in:
Viktor Szakats
2011-02-21 17:25:43 +00:00
parent 743a53e052
commit 056e778977
2 changed files with 8 additions and 2 deletions

View File

@@ -16,6 +16,11 @@
The license applies to all entries newer than 2009-04-28.
*/
2011-02-21 18:25 UTC+0100 Viktor Szakats (harbour.01 syenar.hu)
* src/rtl/fscopy.c
! Fixed missing header in prev.
! Fixed to check empty value of parameters properly.
2011-02-21 16:40 UTC+0100 Viktor Szakats (harbour.01 syenar.hu)
* src/rtl/fscopy.c
! HB_FCOPY(): RTE when either of the parameters is not string.

View File

@@ -51,6 +51,7 @@
*/
#include "hbapi.h"
#include "hbapierr.h"
#include "hbapifs.h"
#if defined( HB_OS_UNIX )
@@ -131,11 +132,11 @@ HB_FUNC( HB_FCOPY )
{
const char * pszSource = hb_parc( 1 ), * pszDest = hb_parc( 2 );
if( pszSource && pszDest )
if( *pszSource && *pszDest )
hb_retni( hb_fsCopy( pszSource, pszDest ) ? 0 : F_ERROR );
else
{
hb_fsSetFError( 2 );
hb_fsSetFError( 2 /* file not found */ );
hb_retni( F_ERROR );
}
}