luci-app-statistics: escape backslashes as well

Fixes: bab4a3ef ("luci-app-statistics - allow rrd files to contain :")
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
This commit is contained in:
Jo-Philipp Wich 2019-04-30 09:08:56 +02:00
parent e76caf18bf
commit 3b379f01b5

View file

@ -62,7 +62,7 @@ function Graph._mkpath( self, plugin, plugin_instance, dtype, dtype_instance )
end
function Graph.mkrrdpath( self, ... )
return string.format( "%s/%s.rrd", self.opts.rrdpath, string.gsub(self:_mkpath( ... ), ":", "\\:") )
return string.format( "%s/%s.rrd", self.opts.rrdpath, self:_mkpath( ... ):gsub("\\", "\\\\"):gsub(":", "\\:") )
end
function Graph.mkpngpath( self, ... )