Skip to content

Commit

Permalink
Update writer.go
Browse files Browse the repository at this point in the history
  • Loading branch information
syhily authored Jan 17, 2024
1 parent 77281d1 commit d2f025c
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions internal/file/writer.go
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,11 @@ func (c *creator) NewWriter(id, total int64, name, subPath string, format Format
// Ref: https://en.wikipedia.org/wiki/Filename#Reserved_characters_and_words
filename = escape(filename)

// Avoid filename too large.
if len(filename) > 200 {
filename = filename[:200]
}

Check failure on line 70 in internal/file/writer.go

View workflow job for this annotation

GitHub Actions / lint

File is not `gofmt`-ed with `-s` (gofmt)
// Create the download path.
downloadPath := c.downloadPath
if subPath != "" {
Expand Down

0 comments on commit d2f025c

Please sign in to comment.