mirror of
https://github.com/restic/restic.git
synced 2026-11-02 05:25:33 +00:00
node: report error on xattr retrieval using standard error logging
This commit is contained in:
1 parent
f2b9ea6455
commit
df7924f4df
17 files changed
+30
-29
No files matched your search
+2
-2
@@ -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