refactor(thumb): reset thumb status after renaming a file with no thumb available

This commit is contained in:
Aaron Liu
2023-04-07 19:09:13 +08:00
parent f36e39991d
commit ae118c337e
3 changed files with 15 additions and 10 deletions

View File

@@ -51,7 +51,7 @@ func NewThumbFromFile(file io.Reader, name string) (*Thumb, error) {
return nil, fmt.Errorf("unknown image format: %w", ErrPassThrough)
}
if err != nil {
return nil, err
return nil, fmt.Errorf("failed to parse image: %w (%w)", err, ErrPassThrough)
}
return &Thumb{