diff options
author | Matthew Wild <mwild1@gmail.com> | 2012-01-22 22:55:49 +0000 |
---|---|---|
committer | Matthew Wild <mwild1@gmail.com> | 2012-01-22 22:55:49 +0000 |
commit | 31c2d43e55f9cee309d9feeaca3ff53ceb66ceef (patch) | |
tree | acc1b9c5576f0ba21b56fd5b133a4a173798d042 /tools/migration/migrator | |
parent | 76628c7453e56d5e156214c142ca05f9908c0191 (diff) | |
parent | 8292f713bab8e71624f03111115bd3a97cf8dae9 (diff) | |
download | prosody-31c2d43e55f9cee309d9feeaca3ff53ceb66ceef.tar.gz prosody-31c2d43e55f9cee309d9feeaca3ff53ceb66ceef.zip |
Merge with trunk
Diffstat (limited to 'tools/migration/migrator')
-rw-r--r-- | tools/migration/migrator/jabberd14.lua | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/tools/migration/migrator/jabberd14.lua b/tools/migration/migrator/jabberd14.lua index 47004a52..54c45d94 100644 --- a/tools/migration/migrator/jabberd14.lua +++ b/tools/migration/migrator/jabberd14.lua @@ -67,15 +67,12 @@ local parse_xml = (function() end)(); local function load_xml(path) - if path then - local f, err = io_open(path); - if not f then return f, err; end - local data = f:read("*a"); - f:close(); - if data then - return parse_xml(data); - end - end + local f, err = io_open(path); + if not f then return f, err; end + local data = f:read("*a"); + f:close(); + if not data then return; end + return parse_xml(data); end local function load_spool_file(host, filename, path) |