diff options
-rw-r--r-- | plugins/mod_invites.lua | 2 | ||||
-rw-r--r-- | util/prosodyctl/cert.lua | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/plugins/mod_invites.lua b/plugins/mod_invites.lua index 559170cc..5ee9430a 100644 --- a/plugins/mod_invites.lua +++ b/plugins/mod_invites.lua @@ -193,7 +193,7 @@ function get(token, username) type = token_info and token_info.type or "roster"; uri = token_info and token_info.uri or get_uri("roster", username.."@"..module.host, token); additional_data = token_info and token_info.additional_data or nil; - reusable = token_info.reusable; + reusable = token_info and token_info.reusable or false; }, valid_invite_mt); end diff --git a/util/prosodyctl/cert.lua b/util/prosodyctl/cert.lua index aea61c20..70c09443 100644 --- a/util/prosodyctl/cert.lua +++ b/util/prosodyctl/cert.lua @@ -163,7 +163,7 @@ local function copy(from, to, umask, owner, group) local attrs = lfs.attributes(to); if attrs then -- Move old file out of the way local backup = to..".bkp~"..os.date("%FT%T", attrs.change); - os.rename(to, backup); + assert(os.rename(to, backup)); end -- FIXME friendlier error handling, maybe move above backup back? local input = assert(io.open(from)); |