From 2565f7088845489d50519f8fa91ba03d386d97d4 Mon Sep 17 00:00:00 2001 From: Pim van den Berg Date: Sun, 21 Mar 2010 13:48:02 +0100 Subject: fix: file2identifier must return identifiers (not basenames) The identifier is needed to send the FLUSH command to the UnixSock plugin. Partly revert of commit: 596dd7d41 [make rrdfiles using utf8 and spaces work] --- type/Default.class.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'type') diff --git a/type/Default.class.php b/type/Default.class.php index 07e17aa..e3997de 100644 --- a/type/Default.class.php +++ b/type/Default.class.php @@ -128,7 +128,8 @@ class Type_Default { function file2identifier($files) { foreach($files as $key => $file) { if (is_file($file)) { - $files[$key] = basename($files[$key], '.rrd'); + $files[$key] = preg_replace("#^$this->datadir/#u", '', $files[$key]); + $files[$key] = preg_replace('#\.rrd$#', '', $files[$key]); } } -- cgit v1.1