From 186bb85c4431123b95c20807775fdb2c5cbc10d8 Mon Sep 17 00:00:00 2001 From: Nick Craig-Wood Date: Thu, 29 Feb 2024 14:46:31 +0000 Subject: [PATCH] crypt: add missing error check spotted by linter --- backend/crypt/crypt.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/backend/crypt/crypt.go b/backend/crypt/crypt.go index 6c19bb981..23b684ab8 100644 --- a/backend/crypt/crypt.go +++ b/backend/crypt/crypt.go @@ -566,7 +566,10 @@ func (f *Fs) MkdirMetadata(ctx context.Context, dir string, metadata fs.Metadata return nil, err } var entries = make(fs.DirEntries, 0, 1) - f.addDir(ctx, &entries, newDir) + err = f.addDir(ctx, &entries, newDir) + if err != nil { + return nil, err + } newDir, ok := entries[0].(fs.Directory) if !ok { return nil, fmt.Errorf("internal error: expecting %T to be fs.Directory", entries[0])