diff --git a/tools/perf/util/data.c b/tools/perf/util/data.c index 8993253c5564..df173f0bf654 100644 --- a/tools/perf/util/data.c +++ b/tools/perf/util/data.c @@ -306,7 +306,7 @@ static int open_dir(struct perf_data *data) * So far we open only the header, so we can read the data version and * layout. */ - if (asprintf(&data->file.path, "%s/header", data->path) < 0) + if (asprintf(&data->file.path, "%s/data", data->path) < 0) return -1; if (perf_data__is_write(data) && diff --git a/tools/perf/util/util.c b/tools/perf/util/util.c index ae56c766eda1..3096654377c2 100644 --- a/tools/perf/util/util.c +++ b/tools/perf/util/util.c @@ -185,7 +185,7 @@ static int rm_rf_depth_pat(const char *path, int depth, const char **pat) int rm_rf_perf_data(const char *path) { const char *pat[] = { - "header", + "data", "data.*", NULL, };