From: Freddie Chopin Date: Sat, 22 Oct 2011 07:53:55 +0000 (+0200) Subject: Fix "Evaluate 'script' in the global scope" X-Git-Tag: v0.6.0-rc1~503 X-Git-Url: https://review.openocd.org/gitweb?p=openocd.git;a=commitdiff_plain;h=ea10093422df328bbb33c78d21dc4646a193f8bf Fix "Evaluate 'script' in the global scope" This fixes commit Evaluate 'script' in the global scope. It caused Windows builds behave differently than before because path was evaluated twice and backslashes from Windows' paths got unescaped and effectively wiped out. Configs could only be passed with "-f ../dir/config.cfg" or "-f ..\\dir\\config.cfg" instead of usual "-f dir/config.cfg" (or using backslash) as previously. Change-Id: I13b4abac6dbe6d770cc11a4e61c9421ef340da83 Author: Steve Bennett Signed-off-by: Freddie Chopin Reviewed-on: http://openocd.zylin.com/40 Tested-by: jenkins Reviewed-by: Xiaofan Reviewed-by: Spencer Oliver --- diff --git a/src/helper/startup.tcl b/src/helper/startup.tcl index e2ea27d0a4..a7c0d5844f 100644 --- a/src/helper/startup.tcl +++ b/src/helper/startup.tcl @@ -55,7 +55,7 @@ add_help_text find "print full path to file according to OpenOCD search rules" # Find and run a script proc script {filename} { - uplevel #0 source [find $filename] + uplevel #0 [list source [find $filename]] } add_help_text script "filename of OpenOCD script (tcl) to run" add_usage_text script ""