Software /
code /
prosody
Changeset
13518:0ef9c26d9d96 0.12
util.prosodyctl.cert: Ensure old cert is moved out of the way
This should make it visible if the move fails
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Fri, 30 Aug 2024 17:41:40 +0200 |
parents | 13513:2fb79fe54390 |
children | 13519:0b6af170617b |
files | util/prosodyctl/cert.lua |
diffstat | 1 files changed, 1 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/util/prosodyctl/cert.lua Sun Aug 18 16:58:30 2024 +0200 +++ b/util/prosodyctl/cert.lua Fri Aug 30 17:41:40 2024 +0200 @@ -163,7 +163,7 @@ 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));