From e95ba659594ce961648fb2d74dd1ddc71001b205 Mon Sep 17 00:00:00 2001 From: Chris Mason Date: Wed, 17 Oct 2012 15:45:49 -0400 Subject: [PATCH] iowatcher: Fix path name handling when the trace files are in the current directory Signed-off-by: Chris Mason --- iowatcher/blkparse.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/iowatcher/blkparse.c b/iowatcher/blkparse.c index f432f4d..7d32f40 100644 --- a/iowatcher/blkparse.c +++ b/iowatcher/blkparse.c @@ -633,7 +633,7 @@ static char *find_trace_file(char *filename) try = strdup(filename); dot = strrchr(try, '.'); if (!dot || strcmp(".dump", dot) != 0) { - if (dot) + if (dot && dot != try) *dot = '\0'; snprintf(line, 1024, "%s%s", try, ".blktrace.0"); ret = stat(line, &st); -- 2.25.1