diff options
| author | 2025-07-16 18:12:06 +0700 | |
|---|---|---|
| committer | 2025-07-16 18:12:06 +0700 | |
| commit | ce7afeb5cb433a55fe2c30ab71cbeeb07c14b830 (patch) | |
| tree | 342522039382bc8edda301491da3def0aff211bc /internal | |
| parent | 6a99a619969fa39af65c09b687a1b037b58d8328 (diff) | |
| download | thumbnail-generator-ce7afeb5cb433a55fe2c30ab71cbeeb07c14b830.tar.gz thumbnail-generator-ce7afeb5cb433a55fe2c30ab71cbeeb07c14b830.zip | |
fix: tweak behavior on no mddate attribute found
Diffstat (limited to 'internal')
| -rw-r--r-- | internal/client/output/local_unix.go | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/internal/client/output/local_unix.go b/internal/client/output/local_unix.go index 798be3b..b106726 100644 --- a/internal/client/output/local_unix.go +++ b/internal/client/output/local_unix.go @@ -3,6 +3,7 @@ package output import ( "fmt" "io" + "log/slog" "mime" "os" "strconv" @@ -101,7 +102,8 @@ func (c *LocalUnixOutputClient) ReadMetadata(path string) (*MetadataStruct, erro case "xattr": sz, err := unix.Getxattr(c.path+path, "user.originalfile.mddate", nil) if err != nil { - return nil, fmt.Errorf("fail to get size of user.originalfile.mddate attribute: %w", err) + slog.Warn("fail to get size of user.originalfile.mddate attribute, proceeding as if no such attribute is there", slog.String("error", err.Error())) + break } mddateOriginal = make([]byte, sz) if _, err = unix.Getxattr(c.path+path, "user.originalfile.mddate", mddateOriginal); err != nil { |