Skip to content

Commit

Permalink
fix(#60): apply --skip-on-error to invalid file name error
Browse files Browse the repository at this point in the history
  • Loading branch information
hareku committed Dec 23, 2024
1 parent 8aaa364 commit aa1e780
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions pkg/fanbox/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,11 @@ func (c *Client) handleAsset(ctx context.Context, post Post, order int, d Downlo

isDownloaded, err := c.Storage.Exist(post, order, d)
if err != nil {
if c.SkipOnError {
slog.ErrorContext(ctx, "Skip downloading due to error", "error", err)
return nil
}

return fmt.Errorf("check whether downloaded: %w", err)
}

Expand Down

0 comments on commit aa1e780

Please sign in to comment.