Skip to content

Commit

Permalink
Cmd/extract: use filename from Content-Disposition only when it's not…
Browse files Browse the repository at this point in the history
… empty
  • Loading branch information
CorentinB committed Mar 23, 2024
1 parent 0139d35 commit 24e092b
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion cmd/extract.go
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,9 @@ func writeFile(vmd *cobra.Command, resp *http.Response, record *warc.Record) err
return err
}

filename = params["filename"]
if params["filename"] != "" {
filename = params["filename"]
}
}

// Truncate the filename if it's too long (keep the extension)
Expand Down

0 comments on commit 24e092b

Please sign in to comment.