mirror of
https://github.com/stashapp/stash.git
synced 2025-12-06 08:26:00 +01:00
Treat images with no exif metadata as well-oriented (#6006)
This commit is contained in:
parent
cc97e96eaa
commit
12c4e1f61c
1 changed files with 2 additions and 1 deletions
|
|
@ -4,6 +4,7 @@ import (
|
|||
"errors"
|
||||
"fmt"
|
||||
"io"
|
||||
"strings"
|
||||
|
||||
"github.com/rwcarlsen/goexif/exif"
|
||||
"github.com/stashapp/stash/pkg/logger"
|
||||
|
|
@ -33,7 +34,7 @@ func areDimensionsFlipped(fs models.FS, path string) (bool, error) {
|
|||
|
||||
x, err := exif.Decode(r)
|
||||
if err != nil {
|
||||
if errors.Is(err, io.EOF) {
|
||||
if errors.Is(err, io.EOF) || strings.Contains(err.Error(), "failed to find exif") {
|
||||
// no exif data
|
||||
return false, nil
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue