From: Simon J Mudd Date: Thu, 4 Dec 2014 17:56:36 +0000 (+0100) Subject: Match $datadir and show as for odd stuff X-Git-Url: http://git.iain.cx/?a=commitdiff_plain;h=70958285d5ba4dd015ba72dac01c794ae6e98354;p=pstop.git Match $datadir and show as for odd stuff --- diff --git a/performance_schema/file_summary_by_instance/file_summary_by_instance_row.go b/performance_schema/file_summary_by_instance/file_summary_by_instance_row.go index 3e6b908..711b742 100644 --- a/performance_schema/file_summary_by_instance/file_summary_by_instance_row.go +++ b/performance_schema/file_summary_by_instance/file_summary_by_instance_row.go @@ -274,6 +274,12 @@ func (t file_summary_by_instance_row) simple_name(global_variables map[string]st if re_charset.MatchString(path) == true { return cache.Put(path, "") } + // clean up datadir to + if len(global_variables["datadir"]) > 0 { + re_datadir := regexp.MustCompile("^" + global_variables["datadir"]) + path = re_datadir.ReplaceAllLiteralString(path, "/") + } + return cache.Put(path, path) }