fix(dfget): Change file path (#3519)

This commit is contained in:
RoLuoGan 2024-09-23 10:40:52 +08:00 committed by GitHub
parent 7bcbac9d61
commit b226996977
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 1 deletions

View File

@ -160,7 +160,7 @@ func downloadFromSource(ctx context.Context, cfg *config.DfgetConfig, hdr map[st
}
defer func() {
if !renameOK {
tempPath := path.Join(filepath.Dir(cfg.Output), tempFile.Name())
tempPath := tempFile.Name()
removeErr := os.Remove(tempPath)
if removeErr != nil {
wLog.Infof("remove temporary file %s error: %s", tempPath, removeErr)