1
mirror of https://github.com/rclone/rclone synced 2024-12-22 13:03:02 +01: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
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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
}

4
go.mod
View File

@ -28,8 +28,8 @@ require (
github.com/go-chi/chi/v5 v5.0.8
github.com/google/uuid v1.3.0
github.com/hanwen/go-fuse/v2 v2.2.1-0.20230410213758-80c1c8221982
github.com/henrybear327/Proton-API-Bridge v0.0.0-20230718092444-8d7db1ea7ba3
github.com/henrybear327/go-proton-api v0.0.0-20230717103708-031d819d74ab
github.com/henrybear327/Proton-API-Bridge v0.0.0-20230723062517-e2f54121245f
github.com/henrybear327/go-proton-api v0.0.0-20230723062344-776bc2954583
github.com/hirochachacha/go-smb2 v1.1.0
github.com/iguanesolutions/go-systemd/v5 v5.1.1
github.com/jcmturner/gokrb5/v8 v8.4.4

8
go.sum
View File

@ -297,10 +297,10 @@ github.com/hashicorp/go-uuid v1.0.3 h1:2gKiV6YVmrJ1i2CKKa9obLvRieoRGviZFL26PcT/C
github.com/hashicorp/go-uuid v1.0.3/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro=
github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8=
github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8=
github.com/henrybear327/Proton-API-Bridge v0.0.0-20230718092444-8d7db1ea7ba3 h1:zHD8RHbznszGBR/jlpdFIy8ncXxIqxrso2dj11BWlb0=
github.com/henrybear327/Proton-API-Bridge v0.0.0-20230718092444-8d7db1ea7ba3/go.mod h1:wRQQcwkzqMaCqdX3iLDbBTp6woZ7+j0lZI4jW9SukDw=
github.com/henrybear327/go-proton-api v0.0.0-20230717103708-031d819d74ab h1:Lj7+orKyKsOo3UwlopF+IxC7RWdyboAi800RWHiI8Ig=
github.com/henrybear327/go-proton-api v0.0.0-20230717103708-031d819d74ab/go.mod h1:l42xBSOrCmkAxzWUHcoUsG/cP8m1hMhV72GoChOX3bg=
github.com/henrybear327/Proton-API-Bridge v0.0.0-20230723062517-e2f54121245f h1:jDQrsIwJqICOozOUS6o41Yc62+AfdmAx4Fs2Mumij0M=
github.com/henrybear327/Proton-API-Bridge v0.0.0-20230723062517-e2f54121245f/go.mod h1:2EULVajyoET4J2QMed3q6FJw2k/aawR6cplYkzqHTGA=
github.com/henrybear327/go-proton-api v0.0.0-20230723062344-776bc2954583 h1:Bbv0iyHKIr2ZXSOKcG4Ja8Z+NxWKdOVqGSLd3/SQTLk=
github.com/henrybear327/go-proton-api v0.0.0-20230723062344-776bc2954583/go.mod h1:l42xBSOrCmkAxzWUHcoUsG/cP8m1hMhV72GoChOX3bg=
github.com/hirochachacha/go-smb2 v1.1.0 h1:b6hs9qKIql9eVXAiN0M2wSFY5xnhbHAQoCwRKbaRTZI=
github.com/hirochachacha/go-smb2 v1.1.0/go.mod h1:8F1A4d5EZzrGu5R7PU163UcMRDJQl4FtcxjBfsY8TZE=
github.com/huandu/xstrings v1.0.0/go.mod h1:4qWG/gcEcfX4z/mBDHJ++3ReCw9ibxbsNJbcucJdbSo=