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.
This commit is contained in:
Nick Craig-Wood 2018-06-15 14:50:17 +01:00
parent d9d00a7dd7
commit c47a4c9703
1 changed files with 2 additions and 2 deletions

View File

@ -1027,7 +1027,7 @@ func (o *Object) Update(in io.Reader, src fs.ObjectInfo, options ...fs.OpenOptio
o.id = closeResponse.FileID
o.size = closeResponse.Size
// Set the mod time now and read metadata
// Set the mod time now
err = o.SetModTime(modTime)
if err != nil {
return err
@ -1049,7 +1049,7 @@ func (o *Object) Update(in io.Reader, src fs.ObjectInfo, options ...fs.OpenOptio
return err
}
return nil
return o.readMetaData()
}
func (o *Object) readMetaData() (err error) {