Selaa lähdekoodia

fix rename failed when rewrite public keys (#7761) (#7769)

tags/v1.9.1
Lunny Xiao 4 vuotta sitten
vanhempi
commit
aea49d0b92
No account linked to committer's email address
1 muutettua tiedostoa jossa 3 lisäystä ja 1 poistoa
  1. 3
    1
      models/ssh_key.go

+ 3
- 1
models/ssh_key.go Näytä tiedosto

@@ -642,12 +642,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…
Peruuta
Tallenna