2010-07-26 15:08 UTC+0200 Viktor Szakats (harbour.01 syenar.hu)

* src/rtl/fscopy.c
    ! Fixed to properly set FERROR() values.

  * contrib/hbnetio/utils/netiosrv.prg
    ! Do not pass the password by reference.
This commit is contained in:
Viktor Szakats
2010-07-26 13:09:19 +00:00
parent 46f7e48f29
commit a29bb9d822
3 changed files with 21 additions and 7 deletions

View File

@@ -16,6 +16,13 @@
The license applies to all entries newer than 2009-04-28.
*/
2010-07-26 15:08 UTC+0200 Viktor Szakats (harbour.01 syenar.hu)
* src/rtl/fscopy.c
! Fixed to properly set FERROR() values.
* contrib/hbnetio/utils/netiosrv.prg
! Do not pass the password by reference.
2010-07-26 12:34 UTC+0200 Viktor Szakats (harbour.01 syenar.hu)
* contrib/hbqt/tests/wvtqt.hbp
* contrib/hbxbp/tests/wvtqt.hbp

View File

@@ -145,7 +145,7 @@ PROCEDURE Main( ... )
netiosrv[ _NETIOSRV_cIFAddr ],;
netiosrv[ _NETIOSRV_cRootDir ],;
iif( Empty( netiosrv[ _NETIOSRV_cRPCFHRB ] ), netiosrv[ _NETIOSRV_lRPC ], hb_hrbGetFunSym( netiosrv[ _NETIOSRV_cRPCFHRB ], _RPC_FILTER ) ),;
@cPassword )
cPassword )
netiosrv[ _NETIOSRV_lEncryption ] := ! Empty( cPassword )
cPassword := NIL

View File

@@ -62,6 +62,7 @@
HB_BOOL hb_fsCopy( const char * pszSource, const char * pszDest )
{
HB_ERRCODE errCode = 0;
HB_BOOL bRetVal = HB_TRUE;
HB_FHANDLE fhndSource;
HB_FHANDLE fhndDest;
@@ -81,6 +82,7 @@ HB_BOOL hb_fsCopy( const char * pszSource, const char * pszDest )
{
if( nBytesRead != hb_fsWrite( fhndDest, pbyBuffer, nBytesRead ) )
{
errCode = hb_fsError();
bRetVal = HB_FALSE;
break;
}
@@ -96,28 +98,33 @@ HB_BOOL hb_fsCopy( const char * pszSource, const char * pszDest )
hb_fsClose( fhndDest );
}
else
{
errCode = hb_fsError();
bRetVal = HB_FALSE;
}
hb_fsClose( fhndSource );
}
else
{
errCode = hb_fsError();
bRetVal = HB_FALSE;
}
hb_fsSetFError( errCode );
return bRetVal;
}
HB_FUNC( HB_FCOPY )
{
HB_ERRCODE uiError = 2;
const char * pszSource = hb_parc( 1 ), * pszDest = hb_parc( 2 );
if( pszSource && pszDest )
{
hb_retni( hb_fsCopy( pszSource, pszDest ) ? 0 : F_ERROR );
uiError = hb_fsError();
}
else
{
hb_fsSetFError( 2 );
hb_retni( F_ERROR );
hb_fsSetFError( uiError );
}
}