From 9b76780bd8ae925ec96d88095af0f109d443d07d Mon Sep 17 00:00:00 2001 From: Viktor Szakats Date: Mon, 9 Apr 2012 09:14:22 +0000 Subject: [PATCH] 2012-04-09 11:13 UTC+0200 Viktor Szakats (harbour syenar.net) * contrib/hbformat/hbfmtcls.prg ! use HB_FCOPY() instead of FRENAME() to create backup. this makes it work when .bak already exists. --- harbour/ChangeLog | 5 +++++ harbour/contrib/hbformat/hbfmtcls.prg | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/harbour/ChangeLog b/harbour/ChangeLog index f967ca4ede..101bd00e65 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -16,6 +16,11 @@ The license applies to all entries newer than 2009-04-28. */ +2012-04-09 11:13 UTC+0200 Viktor Szakats (harbour syenar.net) + * contrib/hbformat/hbfmtcls.prg + ! use HB_FCOPY() instead of FRENAME() to create backup. + this makes it work when .bak already exists. + 2012-04-09 00:07 UTC+0200 Viktor Szakats (harbour syenar.net) * bin/hb3rdpat.hbs * formatting diff --git a/harbour/contrib/hbformat/hbfmtcls.prg b/harbour/contrib/hbformat/hbfmtcls.prg index e87bfd8ea6..86c5332cd4 100644 --- a/harbour/contrib/hbformat/hbfmtcls.prg +++ b/harbour/contrib/hbformat/hbfmtcls.prg @@ -804,7 +804,7 @@ METHOD Array2File( cFileName, aFile ) CLASS HBFORMATCODE cName := iif( ( i := RAt( ".", cFileName ) ) == 0, cFileName, SubStr( cFileName, 1, i - 1 ) ) IF Empty( ::cExtSave ) cBakName := cName + iif( Left( ::cExtBack, 1 ) != ".", ".", "" ) + ::cExtBack - IF FRename( cFileName, cBakName ) == F_ERROR + IF hb_FCopy( cFileName, cBakName ) == F_ERROR RETURN .F. ENDIF ENDIF