summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorJo-Philipp Wich <jo@mein.io>2019-04-30 09:08:56 +0200
committerJo-Philipp Wich <jo@mein.io>2019-04-30 09:08:56 +0200
commit3b379f01b52ec1150662f707864608e3e0f51c3f (patch)
tree90e659eae595162e1b9f78606b40ba681f16c468
parente76caf18bf856967facb51546e0c90fca9b692ae (diff)
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>
-rw-r--r--applications/luci-app-statistics/luasrc/statistics/rrdtool.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/applications/luci-app-statistics/luasrc/statistics/rrdtool.lua b/applications/luci-app-statistics/luasrc/statistics/rrdtool.lua
index 29090eed8..4586b23ca 100644
--- a/applications/luci-app-statistics/luasrc/statistics/rrdtool.lua
+++ b/applications/luci-app-statistics/luasrc/statistics/rrdtool.lua
@@ -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, ... )