From 3933b1e7f5e6795c696416c54accbf520fbe714f Mon Sep 17 00:00:00 2001 From: Nick Craig-Wood Date: Sat, 17 Sep 2022 16:40:45 +0100 Subject: [PATCH] compress: add extra debugging in case we have a repeat of #6434 --- backend/compress/compress.go | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/backend/compress/compress.go b/backend/compress/compress.go index 6429e5a7e..6bfe1210c 100644 --- a/backend/compress/compress.go +++ b/backend/compress/compress.go @@ -29,6 +29,7 @@ import ( "github.com/rclone/rclone/fs/config/configstruct" "github.com/rclone/rclone/fs/fspath" "github.com/rclone/rclone/fs/hash" + "github.com/rclone/rclone/fs/log" "github.com/rclone/rclone/fs/object" "github.com/rclone/rclone/fs/operations" ) @@ -1129,6 +1130,9 @@ func (o *Object) Update(ctx context.Context, in io.Reader, src fs.ObjectInfo, op // This will initialize the variables of a new press Object. The metadata object, mo, and metadata struct, meta, must be specified. func (f *Fs) newObject(o fs.Object, mo fs.Object, meta *ObjectMetadata) *Object { + if o == nil { + log.Trace(nil, "newObject(%#v, %#v, %#v) called with nil o", o, mo, meta) + } return &Object{ Object: o, f: f, @@ -1141,6 +1145,9 @@ func (f *Fs) newObject(o fs.Object, mo fs.Object, meta *ObjectMetadata) *Object // This initializes the variables of a press Object with only the size. The metadata will be loaded later on demand. func (f *Fs) newObjectSizeAndNameOnly(o fs.Object, moName string, size int64) *Object { + if o == nil { + log.Trace(nil, "newObjectSizeAndNameOnly(%#v, %#v, %#v) called with nil o", o, moName, size) + } return &Object{ Object: o, f: f,