diff options
author | Chris Mason <chris.mason@fusionio.com> | 2012-10-17 15:45:49 -0400 |
---|---|---|
committer | Chris Mason <clm@fb.com> | 2014-09-24 12:02:07 -0700 |
commit | e95ba659594ce961648fb2d74dd1ddc71001b205 (patch) | |
tree | ab8a975ef3ce158f6fad673f481993d52f883db8 | |
parent | d79212594039b93458a563fb440c424146671a3b (diff) | |
download | blktrace-e95ba659594ce961648fb2d74dd1ddc71001b205.tar.gz |
iowatcher: Fix path name handling when the trace files are in the current directory
Signed-off-by: Chris Mason <chris.mason@fusionio.com>
-rw-r--r-- | iowatcher/blkparse.c | 2 |
1 files changed, 1 insertions, 1 deletions
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); |