about summary refs log tree commit diff
path: root/extrace.c
diff options
context:
space:
mode:
authorChristian Neukirchen <chneukirchen@gmail.com>2016-06-13 15:01:08 +0200
committerChristian Neukirchen <chneukirchen@gmail.com>2016-06-13 15:01:08 +0200
commit3c4c149abae048e421f8a18e6543b247e703e95b (patch)
tree6520981bc055a0f995048c0635703f491d78b036 /extrace.c
parent65f8a6bdd881c63bcbf656232978f00e7867713a (diff)
downloadextrace-3c4c149abae048e421f8a18e6543b247e703e95b.tar.gz
extrace-3c4c149abae048e421f8a18e6543b247e703e95b.tar.xz
extrace-3c4c149abae048e421f8a18e6543b247e703e95b.zip
quote cwd too
Diffstat (limited to 'extrace.c')
-rw-r--r--extrace.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/extrace.c b/extrace.c
index bb256d6..8619fa1 100644
--- a/extrace.c
+++ b/extrace.c
@@ -206,8 +206,10 @@ handle_msg(struct cn_msg *cn_hdr)
     if (!flat)
       fprintf(output, "%*s", 2*d, "");
     fprintf(output, "%d ", ev->event_data.exec.process_pid);
-    if (show_cwd)
-      fprintf(output, "%s %% ", cwd);
+    if (show_cwd) {
+      print_shquoted(cwd);
+      fprintf(output, " %% ");
+    }
 
     if (full_path)
       print_shquoted(exe);