From 5e502b67d27a7ce19b7320a91abec80e52a790a5 Mon Sep 17 00:00:00 2001 From: Rodrigo Arias Date: Tue, 17 Sep 2024 14:30:10 +0200 Subject: [PATCH] Remove trailing slashes from tracedir --- src/emu/trace.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/emu/trace.c b/src/emu/trace.c index 96aa414..41bd938 100644 --- a/src/emu/trace.c +++ b/src/emu/trace.c @@ -105,6 +105,10 @@ trace_load(struct trace *trace, const char *tracedir) return -1; } + /* Remove trailing slashes from tracedir */ + path_remove_trailing(trace->tracedir); + tracedir = trace->tracedir; + /* Try to open the directory to catch permission errors */ DIR *dir = opendir(tracedir); if (dir == NULL) {