fix: broken file with local proxy (#7132 close #7112)

* fix: local proxy download file damage

* fix: temp dir remove
This commit is contained in:
foxxorcat
2024-09-08 10:44:34 +08:00
committed by GitHub
parent 4874c9e43b
commit c9fa3d7cd6
2 changed files with 14 additions and 2 deletions

View File

@ -267,6 +267,12 @@ func Link(ctx context.Context, storage driver.Driver, path string, args model.Li
}
return link, nil
}
if storage.Config().OnlyLocal {
link, err := fn()
return link, file, err
}
link, err, _ := linkG.Do(key, fn)
return link, file, err
}