From 73fdeecbf30062611cf92daaf34576556cd048d6 Mon Sep 17 00:00:00 2001 From: abv Date: Fri, 13 Jul 2012 16:00:49 +0400 Subject: [PATCH] 0023229: Avoid overriding existing custom.bat (or .sh) in workbench Command wgenproj will not override any more existing custom.bat (.sh) file in the current workbench. Corrected -force argument and handling of copy failure --- src/WOKsite/wok_tclshrc.tcl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/WOKsite/wok_tclshrc.tcl b/src/WOKsite/wok_tclshrc.tcl index 8aa9ce7..ea84622 100644 --- a/src/WOKsite/wok_tclshrc.tcl +++ b/src/WOKsite/wok_tclshrc.tcl @@ -288,11 +288,11 @@ proc wgenprojbat {thePath} { close $anEnvFile if { "$::tcl_platform(platform)" == "windows" } { - file copy -force -- "$::env(WOKHOME)/site/custom.bat" "$aBox/custom.bat" + catch {file copy -- "$::env(WOKHOME)/site/custom.bat" "$aBox/custom.bat"} file copy -force -- "$::env(WOKHOME)/lib/templates/draw.bat" "$aBox/draw.bat" file copy -force -- "$::env(WOKHOME)/lib/templates/msvc.bat" "$aBox/msvc.bat" } else { - file copy -force -- "$::env(WOKHOME)/site/custom.sh" "$aBox/custom.sh" + catch {file copy -- "$::env(WOKHOME)/site/custom.sh" "$aBox/custom.sh"} } } -- 2.39.5