Software / code / prosody
Comparison
core/configmanager.lua @ 2552:8dda55217e83
configmanager: Trailing whitespace
| author | Matthew Wild <mwild1@gmail.com> |
|---|---|
| date | Sun, 31 Jan 2010 17:14:52 +0000 |
| parent | 2427:343a9eb7540e |
| child | 2637:82cfc1ec4a7c |
comparison
equal
deleted
inserted
replaced
| 2551:5f15f21014c4 | 2552:8dda55217e83 |
|---|---|
| 65 function load(filename, format) | 65 function load(filename, format) |
| 66 format = format or filename:match("%w+$"); | 66 format = format or filename:match("%w+$"); |
| 67 | 67 |
| 68 if parsers[format] and parsers[format].load then | 68 if parsers[format] and parsers[format].load then |
| 69 local f, err = io.open(filename); | 69 local f, err = io.open(filename); |
| 70 if f then | 70 if f then |
| 71 local ok, err = parsers[format].load(f:read("*a"), filename); | 71 local ok, err = parsers[format].load(f:read("*a"), filename); |
| 72 f:close(); | 72 f:close(); |
| 73 if ok then | 73 if ok then |
| 74 eventmanager.fire_event("config-reloaded", { filename = filename, format = format }); | 74 eventmanager.fire_event("config-reloaded", { filename = filename, format = format }); |
| 75 end | 75 end |