From 7fcf0b9876e3a4fff6aab01a9ec092c4ec293ce5 Mon Sep 17 00:00:00 2001 From: Mathieu Desnoyers Date: Thu, 4 Mar 2021 13:55:14 -0500 Subject: [PATCH] Replace leading dot by underscore for session name Signed-off-by: Mathieu Desnoyers --- src/lttng-trace.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/lttng-trace.c b/src/lttng-trace.c index 29fb4a5..a1a3424 100644 --- a/src/lttng-trace.c +++ b/src/lttng-trace.c @@ -596,6 +596,11 @@ void replace_session_chars(char *session_name) case '/': *p = '_'; break; + case '.': + /* Leading dot is replaced by '_'. */ + if (i == 0) + *p = '_'; + break; default: break; } -- 2.39.5