Skip to content

Commit 350b985

Browse files
committed
Update FileAttributes size to work on 32 bit platforms
1 parent a6d595a commit 350b985

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

backuptar/tar.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -303,7 +303,7 @@ func FileInfoFromHeader(hdr *tar.Header) (name string, size int64, fileInfo *win
303303
if err != nil {
304304
return "", 0, nil, err
305305
}
306-
fileInfo.FileAttributes = uintptr(attr)
306+
fileInfo.FileAttributes = attr
307307
} else {
308308
if hdr.Typeflag == tar.TypeDir {
309309
fileInfo.FileAttributes |= syscall.FILE_ATTRIBUTE_DIRECTORY

fileinfo.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ const (
2020
// FileBasicInfo contains file access time and file attributes information.
2121
type FileBasicInfo struct {
2222
CreationTime, LastAccessTime, LastWriteTime, ChangeTime syscall.Filetime
23-
FileAttributes uintptr // includes padding
23+
FileAttributes uint64 // includes padding
2424
}
2525

2626
// GetFileBasicInfo retrieves times and attributes for a file.

0 commit comments

Comments
 (0)