Software / code / prosody
Comparison
prosodyctl @ 5295:eef393a37e38
prosodyctl: Pop arg items after use. Fixes #306
| author | Kim Alvefur <zash@zash.se> |
|---|---|
| date | Wed, 09 Jan 2013 20:40:44 +0100 |
| parent | 5293:fe9215155453 |
| child | 5296:78b7a4ad2f32 |
comparison
equal
deleted
inserted
replaced
| 5294:87f07dd0bbfb | 5295:eef393a37e38 |
|---|---|
| 65 local filenames = {}; | 65 local filenames = {}; |
| 66 | 66 |
| 67 local filename; | 67 local filename; |
| 68 if arg[1] == "--config" and arg[2] then | 68 if arg[1] == "--config" and arg[2] then |
| 69 table.insert(filenames, arg[2]); | 69 table.insert(filenames, arg[2]); |
| 70 table.remove(arg, 1); table.remove(arg, 1); | |
| 71 if CFG_CONFIGDIR then | 70 if CFG_CONFIGDIR then |
| 72 table.insert(filenames, CFG_CONFIGDIR.."/"..arg[2]); | 71 table.insert(filenames, CFG_CONFIGDIR.."/"..arg[2]); |
| 73 end | 72 end |
| 73 table.remove(arg, 1); table.remove(arg, 1); | |
| 74 else | 74 else |
| 75 for _, format in ipairs(config.parsers()) do | 75 for _, format in ipairs(config.parsers()) do |
| 76 table.insert(filenames, (CFG_CONFIGDIR or ".").."/prosody.cfg."..format); | 76 table.insert(filenames, (CFG_CONFIGDIR or ".").."/prosody.cfg."..format); |
| 77 end | 77 end |
| 78 end | 78 end |