Skip to content

Commit

Permalink
make clear that this is not the complete filename
Browse files Browse the repository at this point in the history
  • Loading branch information
Thomas von Dein authored and TLINDEN committed Jan 6, 2025
1 parent 7014c97 commit fbd9a5a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions scrape.go
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ func ScrapeImages(fetch *Fetcher, advertisement *Ad, addir string) error {
imguri := imguri

// we append the suffix later in NewImage() based on image format
file := filepath.Join(adpath, fmt.Sprintf("%d", img))
basefilename := filepath.Join(adpath, fmt.Sprintf("%d", img))

egroup.Go(func() error {
// wait a little
Expand All @@ -194,7 +194,7 @@ func ScrapeImages(fetch *Fetcher, advertisement *Ad, addir string) error {

reader := bytes.NewReader(buf.Bytes())

image, err := NewImage(reader, file, imguri)
image, err := NewImage(reader, basefilename, imguri)
if err != nil {
return err
}
Expand Down

0 comments on commit fbd9a5a

Please sign in to comment.