Fix review comments

This commit is contained in:
aneesh-n
2024-08-10 10:38:04 -06:00
parent 71632a8197
commit 18e9d71d7a
3 changed files with 8 additions and 3 deletions

View File

@@ -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)
}