prosodyctl
changeset 5295 eef393a37e38
parent 5293 fe9215155453
child 5296 78b7a4ad2f32
--- a/prosodyctl	Wed Jan 09 17:56:40 2013 +0100
+++ b/prosodyctl	Wed Jan 09 20:40:44 2013 +0100
@@ -67,10 +67,10 @@
 	local filename;
 	if arg[1] == "--config" and arg[2] then
 		table.insert(filenames, arg[2]);
-		table.remove(arg, 1); table.remove(arg, 1);
 		if CFG_CONFIGDIR then
 			table.insert(filenames, CFG_CONFIGDIR.."/"..arg[2]);
 		end
+		table.remove(arg, 1); table.remove(arg, 1);
 	else
 		for _, format in ipairs(config.parsers()) do
 			table.insert(filenames, (CFG_CONFIGDIR or ".").."/prosody.cfg."..format);