Changeset

11288:5fd1f1b544a0

util.datamanager: Fix not passing variables as format string to logger (thanks semgrep) Passing error messages as format string could lead to errors, although not a problem anymore since util.format sanitizes this.
author Kim Alvefur <zash@zash.se>
date Sat, 16 Jan 2021 15:49:46 +0100
parents 11287:b602dd3c4bbc
children 11289:c6965f3c321c
files util/datamanager.lua
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/util/datamanager.lua	Sat Jan 16 00:24:06 2021 +0100
+++ b/util/datamanager.lua	Sat Jan 16 15:49:46 2021 +0100
@@ -344,7 +344,7 @@
 
 	local mode, err = lfs.attributes(store_dir, "mode");
 	if not mode then
-		return function() log("debug", err or (store_dir .. " does not exist")) end
+		return function() log("debug", "Could not iterate over stores in %s: %s", store_dir, err); end
 	end
 	local next, state = lfs.dir(store_dir); -- luacheck: ignore 431/next 431/state
 	return function(state) -- luacheck: ignore 431/state