Skip to content

Commit

Permalink
Merge pull request #7 from LuizinhoF/master
Browse files Browse the repository at this point in the history
fixing extesion name on HttpIntercepter
  • Loading branch information
jeansouzak authored Aug 6, 2021
2 parents 63afb57 + 5333b55 commit f1972e4
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/AbstractDuf.php
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ public function prepare(array $resources)
throw new \InvalidArgumentException('One or more resources not contain an empty name or path');
}
if ($resource instanceof WebResource && !filter_var($resource->getUrl(), FILTER_VALIDATE_URL)) {
throw new \InvalidArgumentException('One or more web resources contain an invalid URL');
throw new \InvalidArgumentException('One or more web resources contain an invalid URL - ' . $resource->getUrl());
}
$this->fileResources[] = $resource;
}, ARRAY_FILTER_USE_BOTH);
Expand Down
2 changes: 1 addition & 1 deletion src/Download/Intercepter/HttpIntercepter.php
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ public function induceExtensionFromUrl($url)
}

if (!$queryParamsDelimiter) {
$name = $this->webResource->getName() . $extension;
$name = $this->webResource->getName() . '.' . $extension;
$this->webResource->setName($name);
return true;
}
Expand Down

0 comments on commit f1972e4

Please sign in to comment.