Skip to content

Commit

Permalink
Merge pull request #88 from jiria/fileattributes_size
Browse files Browse the repository at this point in the history
Update FileAttributes size to work across all platforms
  • Loading branch information
jterry75 authored Aug 6, 2018
2 parents a6d595a + 5380df2 commit 78a0846
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion backuptar/tar.go
Original file line number Diff line number Diff line change
Expand Up @@ -303,7 +303,7 @@ func FileInfoFromHeader(hdr *tar.Header) (name string, size int64, fileInfo *win
if err != nil {
return "", 0, nil, err
}
fileInfo.FileAttributes = uintptr(attr)
fileInfo.FileAttributes = uint32(attr)
} else {
if hdr.Typeflag == tar.TypeDir {
fileInfo.FileAttributes |= syscall.FILE_ATTRIBUTE_DIRECTORY
Expand Down
3 changes: 2 additions & 1 deletion fileinfo.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@ const (
// FileBasicInfo contains file access time and file attributes information.
type FileBasicInfo struct {
CreationTime, LastAccessTime, LastWriteTime, ChangeTime syscall.Filetime
FileAttributes uintptr // includes padding
FileAttributes uint32
pad uint32 // padding
}

// GetFileBasicInfo retrieves times and attributes for a file.
Expand Down

0 comments on commit 78a0846

Please sign in to comment.