Skip to content

Commit

Permalink
Wrap errors
Browse files Browse the repository at this point in the history
  • Loading branch information
gabriel-samfira committed Nov 14, 2022
1 parent d6f4cd1 commit 27d81c4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions copy/mkdir_windows.go
Original file line number Diff line number Diff line change
Expand Up @@ -58,11 +58,11 @@ func Chown(p string, old *User, fn Chowner) error {

sidPtr, err := syscall.UTF16PtrFromString(userSIDstring)
if err != nil {
return fmt.Errorf("converting to utf16 ptr: %w", err)
return errors.Wrap(err, "converting to utf16 ptr")
}
var userSID *windows.SID
if err := windows.ConvertStringSidToSid(sidPtr, &userSID); err != nil {
return fmt.Errorf("converting to windows SID: %w", err)
return errors.Wrap(err, "converting to windows SID")
}
var dacl *windows.ACL
newEntries := []windows.EXPLICIT_ACCESS{
Expand Down

0 comments on commit 27d81c4

Please sign in to comment.