Fix review comments
This commit is contained in:
parent
71632a8197
commit
18e9d71d7a
3 changed files with 8 additions and 3 deletions
|
@ -1,10 +1,12 @@
|
|||
Bugfix: Skip EA processing in Windows for volumes that do not support EA
|
||||
|
||||
Restic was failing to backup files on some windows paths like network
|
||||
drives because of errors while fetching ExtendedAttributes.
|
||||
drives because of errors while fetching extended attributes.
|
||||
Either they return error codes like windows.E_NOT_SET or
|
||||
windows.ERROR_INVALID_FUNCTION or it results in slower backups.
|
||||
Restic now completely skips the attempt to fetch Extended Attributes
|
||||
Restic now completely skips the attempt to fetch extended attributes
|
||||
for such volumes where it is not supported.
|
||||
|
||||
https://github.com/restic/restic/pull/4980
|
||||
https://github.com/restic/restic/issues/4955
|
||||
https://github.com/restic/restic/issues/4950
|
||||
|
|
|
@ -11,6 +11,7 @@ import (
|
|||
"unsafe"
|
||||
|
||||
"github.com/restic/restic/internal/debug"
|
||||
"github.com/restic/restic/internal/errors"
|
||||
"golang.org/x/sys/windows"
|
||||
)
|
||||
|
||||
|
@ -60,6 +61,8 @@ func GetSecurityDescriptor(filePath string) (securityDescriptor *[]byte, err err
|
|||
if err != nil {
|
||||
return nil, fmt.Errorf("get low-level named security info failed with: %w", err)
|
||||
}
|
||||
} else if errors.Is(err, windows.ERROR_NOT_SUPPORTED) {
|
||||
return nil, nil
|
||||
} else {
|
||||
return nil, fmt.Errorf("get named security info failed with: %w", err)
|
||||
}
|
||||
|
|
|
@ -392,7 +392,7 @@ func (node *Node) fillGenericAttributes(path string, fi os.FileInfo, stat *statT
|
|||
return false, err
|
||||
}
|
||||
if sd, err = fs.GetSecurityDescriptor(path); err != nil {
|
||||
return true, err
|
||||
return allowExtended, err
|
||||
}
|
||||
}
|
||||
// Add Windows attributes
|
||||
|
|
Loading…
Reference in a new issue