mirror of https://github.com/go-gitea/gitea.git
fix rename failed when rewrite public keys (#7761)
This commit is contained in:
parent
2594693a46
commit
4328d8e8d7
|
@ -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 New Issue