Completed download implementation for Modrinth export

This commit is contained in:
comp500
2022-05-21 05:00:21 +01:00
parent f3837af145
commit dae133b73c
5 changed files with 160 additions and 142 deletions

View File

@@ -382,6 +382,9 @@ func (in Index) SaveFile(f IndexFile, dest io.Writer) error {
hashFormat = in.HashFormat
}
src, err := os.Open(in.GetFilePath(f))
defer func(src *os.File) {
_ = src.Close()
}(src)
if err != nil {
return err
}