mirror of
https://github.com/restic/restic.git
synced 2025-12-11 18:47:50 +00:00
node: report error on xattr retrieval using standard error logging
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user