commit ffb90feb741c97541c17a7b1bf3914106ec231ec parent f7cc5fabbb2e1a00b2e2512f9457291224203526 Author: Sean Enck <sean@ttypty.com> Date: Wed, 15 Feb 2023 20:26:46 -0500 use errors.Is Diffstat:
| M | internal/backend/core.go | | | 6 | ++---- |
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/internal/backend/core.go b/internal/backend/core.go @@ -77,10 +77,8 @@ func encode(f *os.File, db *gokeepasslib.Database) error { // pathExists indicates if a path exists. func pathExists(path string) bool { - if _, err := os.Stat(path); err != nil { - if os.IsNotExist(err) { - return false - } + if _, err := os.Stat(path); errors.Is(err, os.ErrNotExist) { + return false } return true }