iowatcher: Fix path name handling when the trace files are in the current directory
authorChris Mason <chris.mason@fusionio.com>
Wed, 17 Oct 2012 19:45:49 +0000 (15:45 -0400)
committerChris Mason <clm@fb.com>
Wed, 24 Sep 2014 19:02:07 +0000 (12:02 -0700)
Signed-off-by: Chris Mason <chris.mason@fusionio.com>
iowatcher/blkparse.c

index f432f4dca148a661a3aabbbb75c473d0487f7b66..7d32f40b54729fa5ae9282b104970ea5b14c3178 100644 (file)
@@ -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);