mirror of
https://git.sr.ht/~adnano/go-gemini
synced 2024-09-18 13:31:36 +02:00
tofu: Automatically create file in KnownHosts.Load
This commit is contained in:
parent
16e4e9ad7d
commit
90b1e98d61
@ -83,7 +83,7 @@ func (k *KnownHosts) WriteTo(w io.Writer) (int64, error) {
|
||||
|
||||
// Load loads the known hosts entries from the provided path.
|
||||
func (k *KnownHosts) Load(path string) error {
|
||||
f, err := os.Open(path)
|
||||
f, err := os.OpenFile(path, os.O_CREATE|os.O_RDONLY, 0644)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user