mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2024-12-22 12:54:53 -05:00
fix rename failed when rewrite public keys (#7761)
This commit is contained in:
parent
2594693a46
commit
4328d8e8d7
1 changed files with 3 additions and 1 deletions
|
@ -685,12 +685,14 @@ func rewriteAllPublicKeys(e Engine) error {
|
|||
}
|
||||
_, err = t.WriteString(line + "\n")
|
||||
if err != nil {
|
||||
f.Close()
|
||||
return err
|
||||
}
|
||||
}
|
||||
defer f.Close()
|
||||
f.Close()
|
||||
}
|
||||
|
||||
t.Close()
|
||||
return os.Rename(tmpPath, fPath)
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue