node: report error on xattr retrieval using standard error logging

This commit is contained in:
Michael Eischer
2025-09-21 19:24:48 +02:00
parent f2b9ea6455
commit df7924f4df
17 changed files with 30 additions and 29 deletions

View File

@@ -15,7 +15,7 @@ import (
// nodeFromFileInfo returns a new node from the given path and FileInfo. It
// returns the first error that is encountered, together with a node.
func nodeFromFileInfo(path string, fi *ExtendedFileInfo, ignoreXattrListError bool) (*restic.Node, error) {
func nodeFromFileInfo(path string, fi *ExtendedFileInfo, ignoreXattrListError bool, warnf func(format string, args ...any)) (*restic.Node, error) {
node := buildBasicNode(path, fi)
if err := nodeFillExtendedStat(node, path, fi); err != nil {
@@ -23,7 +23,7 @@ func nodeFromFileInfo(path string, fi *ExtendedFileInfo, ignoreXattrListError bo
}
err := nodeFillGenericAttributes(node, path, fi)
err = errors.Join(err, nodeFillExtendedAttributes(node, path, ignoreXattrListError))
err = errors.Join(err, nodeFillExtendedAttributes(node, path, ignoreXattrListError, warnf))
return node, err
}