And here is the fix for my case.
Looking at the code there are probably more cases where the result wrapOpbject
is not the right thing to return directly.
diff --git a/backend/hasher/hasher.go b/backend/hasher/hasher.go
--- a/backend/hasher/hasher.go (revision 169990e270b2977c39bd6ecd8a2921cf30a6d2b7)
+++ b/backend/hasher/hasher.go (date 1647067536954)
@@ -410,6 +410,9 @@
// NewObject finds the Object at remote.
func (f *Fs) NewObject(ctx context.Context, remote string) (fs.Object, error) {
o, err := f.Fs.NewObject(ctx, remote)
+ if err != nil {
+ return nil, err
+ }
return f.wrapObject(o, err), err
}