8000 opendrive: re-read hash when updating objects · devdevmac/rclone@c47a4c9 · GitHub
[go: up one dir, main page]

Skip to content

Commit c47a4c9

Browse files
committed
opendrive: re-read hash when updating objects
Previously this was reading a stale hash from the object leading to broken integration tests. This fixes these integration tests TestSyncDoesntUpdateModtime, TestSyncAfterChangingFilesSizeOnly, TestSyncAfterChangingContentsOnly, TestSyncWithUpdateOlder, TestSyncUTFNorm.
1 parent d9d00a7 commit c47a4c9

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

backend/opendrive/opendrive.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1027,7 +1027,7 @@ func (o *Object) Update(in io.Reader, src fs.ObjectInfo, options ...fs.OpenOptio
10271027
o.id = closeResponse.FileID
10281028
o.size = closeResponse.Size
10291029

1030-
// Set the mod time now and read metadata
1030+
// Set the mod time now
10311031
err = o.SetModTime(modTime)
10321032
if err != nil {
10331033
return err
@@ -1049,7 +1049,7 @@ func (o *Object) Update(in io.Reader, src fs.ObjectInfo, options ...fs.OpenOptio
10491049
return err
10501050
}
10511051

1052-
return nil
1052+
return o.readMetaData()
10531053
}
10541054

10551055
func (o *Object) readMetaData() (err error) {

0 commit comments

Comments
 (0)
0