fix: reset file after seeking

This commit is contained in:
Derrick Hammer 2024-03-29 15:59:01 -04:00
parent d5575fbf4f
commit ba67d19299
Signed by: pcfreak30
GPG Key ID: C997C339BE476FF2
1 changed files with 5 additions and 0 deletions

View File

@ -340,6 +340,11 @@ func (f *S5File) Manifest() (s5libmetadata.Metadata, error) {
return nil, err return nil, err
} }
_, err = f.Seek(0, io.SeekStart)
if err != nil {
return nil, err
}
md, err := f.protocol.Node().Services().Storage().ParseMetadata(data, cid) md, err := f.protocol.Node().Services().Storage().ParseMetadata(data, cid)
if err != nil { if err != nil {
return nil, err return nil, err