From: Mathieu Desnoyers Date: Thu, 4 Mar 2021 18:55:14 +0000 (-0500) Subject: Replace leading dot by underscore for session name X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;p=lttng-trace.git Replace leading dot by underscore for session name Signed-off-by: Mathieu Desnoyers --- 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; }