2013-03-05 11:53 UTC+0100 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)

* harbour/src/rtl/fstemp.c
    ! fixed hb_fsCreateTempEx() to add dir separator if necessary
    % small optimization in DJGPP path conversions
This commit is contained in:
Przemyslaw Czerpak
2013-03-05 10:53:21 +00:00
parent 3a2107c2fe
commit ec5d228d18
2 changed files with 18 additions and 4 deletions

View File

@@ -10,6 +10,11 @@
* Change, ! Fix, % Optimization, + Addition, - Removal, ; Comment
*/
2013-03-05 11:53 UTC+0100 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
* harbour/src/rtl/fstemp.c
! fixed hb_fsCreateTempEx() to add dir separator if necessary
% small optimization in DJGPP path conversions
2013-03-05 11:22 UTC+0100 Tamas TEVESZ (ice extreme.hu)
* src/common/hbver.c
! Open64 5.0 does not define __OPENCC_PATCHLEVEL__ to

View File

@@ -138,8 +138,8 @@ static HB_BOOL fsGetTempDirByCase( char * pszName, const char * pszTempDir, HB_B
{
# if defined( __DJGPP__ )
/* convert '/' to '\' */
char * pszDelim;
while( ( pszDelim = strchr( pszName, '/' ) ) != NULL )
char * pszDelim = pszName;
while( ( pszDelim = strchr( pszDelim, '/' ) ) != NULL )
*pszDelim = '\\';
# endif
if( ! hb_fsDirExists( pszTempDir ) )
@@ -161,7 +161,16 @@ HB_FHANDLE hb_fsCreateTempEx( char * pszName, const char * pszDir, const char *
pszName[ 0 ] = '\0';
if( pszDir && pszDir[ 0 ] != '\0' )
{
hb_strncpy( pszName, pszDir, HB_PATH_MAX - 1 );
iLen = ( int ) strlen( pszName );
if( pszName[ iLen - 1 ] != HB_OS_PATH_DELIM_CHR &&
iLen < HB_PATH_MAX - 1 )
{
pszName[ iLen ] = HB_OS_PATH_DELIM_CHR;
pszName[ iLen + 1 ] = '\0';
}
}
else
hb_fsTempDir( pszName );
@@ -295,8 +304,8 @@ static HB_BOOL hb_fsTempName( char * pszBuffer, const char * pszDir, const char
{
# if defined( __DJGPP__ )
/* convert '/' to '\' */
char * pszDelim;
while( ( pszDelim = strchr( pTmpBuffer, '/' ) ) != NULL )
char * pszDelim = pTmpBuffer;
while( ( pszDelim = strchr( pszDelim, '/' ) ) != NULL )
*pszDelim = '\\';
# endif
hb_osStrDecode2( pTmpBuffer, pszBuffer, HB_PATH_MAX - 1 );