Comparison

util/datamanager.lua @ 6644:6cb6855f60df

util.datamanager: Fix traceback due to %s in log message
author Kim Alvefur <zash@zash.se>
date Fri, 03 Apr 2015 12:10:30 +0200
parent 6575:bdaadf70a48f
child 6681:0217a04722c7
comparison
equal deleted inserted replaced
6631:45222bfb206f 6644:6cb6855f60df
291 typ = type_map[typ or "keyval"]; 291 typ = type_map[typ or "keyval"];
292 local store_dir = format("%s/%s/%s", data_path, encode(host), store); 292 local store_dir = format("%s/%s/%s", data_path, encode(host), store);
293 293
294 local mode, err = lfs.attributes(store_dir, "mode"); 294 local mode, err = lfs.attributes(store_dir, "mode");
295 if not mode then 295 if not mode then
296 return function() log("debug", err or (store_dir .. " does not exist")) end 296 return function() log("debug", "%s", err or (store_dir .. " does not exist")) end
297 end 297 end
298 local next, state = lfs.dir(store_dir); 298 local next, state = lfs.dir(store_dir);
299 return function(state) 299 return function(state)
300 for node in next, state do 300 for node in next, state do
301 local file, ext = node:match("^(.*)%.([dalist]+)$"); 301 local file, ext = node:match("^(.*)%.([dalist]+)$");