diff options
| author | Adnan Maolood <[email protected]> | 2021-03-06 15:11:30 -0500 |
|---|---|---|
| committer | Adnan Maolood <[email protected]> | 2021-03-06 15:11:30 -0500 |
| commit | 5677440876e64ce9efc6d83f01a35e6a858f47a6 (patch) | |
| tree | c69450cdbb23745e15c3892219cd5f077ccaf588 /tofu/tofu.go | |
| parent | certificate.Store: Don't call os.MkdirAll (diff) | |
| download | go-gemini-5677440876e64ce9efc6d83f01a35e6a858f47a6.tar.xz go-gemini-5677440876e64ce9efc6d83f01a35e6a858f47a6.zip | |
tofu: Automatically create file in KnownHosts.Load
Diffstat (limited to 'tofu/tofu.go')
| -rw-r--r-- | tofu/tofu.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tofu/tofu.go b/tofu/tofu.go index 372a633..a2f2a9a 100644 --- a/tofu/tofu.go +++ b/tofu/tofu.go @@ -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 } |