summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDave Brolley <brolley@redhat.com>2010-01-07 17:10:30 -0500
committerDave Brolley <brolley@redhat.com>2010-01-07 17:10:30 -0500
commit12091330be193cd0836d48c525bab015fcec2c75 (patch)
tree87f6088030b143ee6d1a11af0820710d4026799f
parentaf7b183c32c627b1934e9be2d028d7c4ff1a1d2e (diff)
downloadsystemtap-steved-12091330be193cd0836d48c525bab015fcec2c75.tar.gz
systemtap-steved-12091330be193cd0836d48c525bab015fcec2c75.tar.xz
systemtap-steved-12091330be193cd0836d48c525bab015fcec2c75.zip
Take care when echoing something that could start with a -.
-rwxr-xr-xstap-client2
1 files changed, 1 insertions, 1 deletions
diff --git a/stap-client b/stap-client
index a3b37e68..869bff42 100755
--- a/stap-client
+++ b/stap-client
@@ -449,7 +449,7 @@ function include_file_or_directory {
# client's temporary directory.
function generate_client_temp_name {
# Transform the name into a fully qualified path name
- local full_name=`echo "$1" | sed "s,^\\\([^/]\\\),$wd/\\\\1,"`
+ local full_name=`echo "X$1" | sed "s,^X\\\([^/]\\\),$wd/\\\\1," | sed 's,^X,,'`
# The same name without the initial / or trailing /
local local_name=`echo "$full_name" | sed 's,^/\(.*\),\1,'`