From 301c5487dcd85df0a33ffb5a54f00037a5cc98ce Mon Sep 17 00:00:00 2001 From: Viktor Szakats Date: Fri, 12 Mar 2010 15:00:19 +0000 Subject: [PATCH] 2010-03-12 15:59 UTC+0100 Viktor Szakats (harbour.01 syenar.hu) * src/rtl/filesys.c ! Fixed non-UNICODE code after recent get/set drive changes. % Minor opt. --- harbour/ChangeLog | 5 +++++ harbour/src/rtl/filesys.c | 7 +++---- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/harbour/ChangeLog b/harbour/ChangeLog index f29be143b9..74a9b92628 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -17,6 +17,11 @@ past entries belonging to author(s): Viktor Szakats. */ +2010-03-12 15:59 UTC+0100 Viktor Szakats (harbour.01 syenar.hu) + * src/rtl/filesys.c + ! Fixed non-UNICODE code after recent get/set drive changes. + % Minor opt. + 2010-03-12 14:07 UTC+0100 Viktor Szakats (harbour.01 syenar.hu) * contrib/hbnf/fttext.c + Added FT_FWRITELN(). diff --git a/harbour/src/rtl/filesys.c b/harbour/src/rtl/filesys.c index c4c9a4ab9c..08ab662cfc 100644 --- a/harbour/src/rtl/filesys.c +++ b/harbour/src/rtl/filesys.c @@ -323,12 +323,11 @@ static int fs_win_get_drive( void ) #if defined( UNICODE ) { TCHAR lpBuffer[ HB_PATH_MAX ]; - HB_SIZE ulSize = HB_SIZEOFARRAY( lpBuffer ); - hb_fsSetIOError( ( GetCurrentDirectory( ulSize, lpBuffer ) != 0 ), 0 ); - hb_wctombget( szBuffer, lpBuffer, ulSize ); + hb_fsSetIOError( ( GetCurrentDirectory( HB_SIZEOFARRAY( lpBuffer ), lpBuffer ) != 0 ), 0 ); + hb_wctombget( szBuffer, lpBuffer, HB_SIZEOFARRAY( lpBuffer ) ); } #else - hb_fsSetIOError( ( GetCurrentDirectory( ulSize, szBuffer ) != 0 ), 0 ); + hb_fsSetIOError( ( GetCurrentDirectory( HB_SIZEOFARRAY( szBuffer ), szBuffer ) != 0 ), 0 ); #endif pFilepath = hb_fsFNameSplit( szBuffer );