From 90494c980dc049b62c12fb17363f10cdfbbc92bf Mon Sep 17 00:00:00 2001 From: Przemyslaw Czerpak Date: Mon, 28 Jul 2008 00:48:11 +0000 Subject: [PATCH] 2008-07-28 02:47 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl) * harbour/contrib/hbmzip/tests/myzip.prg * harbour/contrib/hbmzip/tests/myunzip.prg * minor cleanup --- harbour/ChangeLog | 5 +++++ harbour/contrib/hbmzip/tests/myunzip.prg | 10 ++++++---- harbour/contrib/hbmzip/tests/myzip.prg | 1 - 3 files changed, 11 insertions(+), 5 deletions(-) diff --git a/harbour/ChangeLog b/harbour/ChangeLog index ae6bb4d883..831563b5e3 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -8,6 +8,11 @@ 2008-12-31 13:59 UTC+0100 Foo Bar */ +2008-07-28 02:47 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl) + * harbour/contrib/hbmzip/tests/myzip.prg + * harbour/contrib/hbmzip/tests/myunzip.prg + * minor cleanup + 2008-07-26 20:13 UTC+0200 Viktor Szakats (harbour.01 syenar hu) * doc/whatsnew.txt + Updated for 1.0.0. diff --git a/harbour/contrib/hbmzip/tests/myunzip.prg b/harbour/contrib/hbmzip/tests/myunzip.prg index 5e076d95f1..f49b8c3775 100644 --- a/harbour/contrib/hbmzip/tests/myunzip.prg +++ b/harbour/contrib/hbmzip/tests/myunzip.prg @@ -53,7 +53,8 @@ PROC MyUnzip( ... ) - LOCAL hUnzip, aWild, cFileName, cWild, cFile, dDate, cTime, nSize, nCompSize, nErr, cPassword, tmp + LOCAL hUnzip, aWild, cFileName, cExt, cPath, cFile, ; + dDate, cTime, nSize, nCompSize, nErr, cPassword, tmp aWild := { ... } IF LEN( aWild ) < 1 @@ -61,10 +62,11 @@ PROC MyUnzip( ... ) RETURN ENDIF - cFileName := aWild[ 1 ] - IF ! ( "." $ cFileName ) - cFileName += ".zip" + HB_FNameSplit( aWild[ 1 ], @cPath, @cFileName, @cExt ) + IF EMPTY( cExt ) + cExt := ".zip" ENDIF + cFileName := HB_FNameMerge( cPath, cFileName, cExt ) ADEL( aWild, 1 ) ASIZE( aWild, LEN( aWild ) - 1 ) diff --git a/harbour/contrib/hbmzip/tests/myzip.prg b/harbour/contrib/hbmzip/tests/myzip.prg index 2f9f516180..ba722a3436 100644 --- a/harbour/contrib/hbmzip/tests/myzip.prg +++ b/harbour/contrib/hbmzip/tests/myzip.prg @@ -67,7 +67,6 @@ PROC MyZip( ... ) IF EMPTY( cExt ) cExt := ".zip" ENDIF - cZipName := HB_FNameMerge( cPath, cFileName, cExt ) HB_ADEL( aWild, 1, .T. )