Skip to content

Commit

Permalink
fix: Only resolve file extension if . is not present
Browse files Browse the repository at this point in the history
  • Loading branch information
caffeine-addictt committed Apr 15, 2024
1 parent 98dd0d5 commit b7a13bc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/get.go
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,7 @@ var getCommand = &cobra.Command{
split := strings.Split(url, "/")
fileName := split[len(split)-1]

if strings.Contains(fileName, ".") {
if !strings.Contains(fileName, ".") {
Info("Resolving file extension from content type...")
contentType := response.Header.Get("Content-Type")
extensions, err := mime.ExtensionsByType(contentType)
Expand Down

0 comments on commit b7a13bc

Please sign in to comment.