1
0
mirror of https://github.com/rclone/rclone.git synced 2025-12-06 00:03:32 +00:00

protondrive: fix bug in digests parsing (#7164)

This commit is contained in:
Chun-Hung Tseng
2023-07-24 09:00:18 +02:00
committed by GitHub
parent 1845c261c6
commit 9a66086fa0
3 changed files with 14 additions and 7 deletions

View File

@@ -902,11 +902,18 @@ func (o *Object) Update(ctx context.Context, in io.Reader, src fs.ObjectInfo, op
return err
}
var sha1Hash string
if val, ok := fileSystemAttrs.Digests["SHA1"]; ok {
sha1Hash = val
} else {
sha1Hash = ""
}
o.id = linkID
o.originalSize = &fileSystemAttrs.Size
o.modTime = modTime
o.blockSizes = fileSystemAttrs.BlockSizes
o.digests = &fileSystemAttrs.Digests
o.digests = &sha1Hash
return nil
}