diff options
| author | Dmitry Vyukov <dvyukov@google.com> | 2024-04-29 07:55:43 +0200 |
|---|---|---|
| committer | Dmitry Vyukov <dvyukov@google.com> | 2024-04-29 14:53:56 +0000 |
| commit | ad452794ee865e84d6bf40479e327aa9d07dec60 (patch) | |
| tree | cfb707e597b8213cf0b1c4ced0ff770c54b289e2 /pkg | |
| parent | ee541933d6cdece196c947c5aeecf496cab5e983 (diff) | |
pkg/host: fix file reading bug
No test b/c this code should be deleted soon.
Diffstat (limited to 'pkg')
| -rw-r--r-- | pkg/host/machine_info.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/pkg/host/machine_info.go b/pkg/host/machine_info.go index 5e2e9e335..698a575a1 100644 --- a/pkg/host/machine_info.go +++ b/pkg/host/machine_info.go @@ -49,7 +49,7 @@ func readFile(file string) FileInfo { data, err := os.ReadFile(file) exists, errStr := true, "" if err != nil { - exists, errStr = os.IsNotExist(err), err.Error() + exists, errStr = !os.IsNotExist(err), err.Error() } return FileInfo{ Name: file, |
