Fixed Extended Files
This commit is contained in:
@@ -140,8 +140,8 @@ func NewFile(rdr io.Reader, blockSize uint32) (File, error) {
|
||||
|
||||
//ExtFileInit is the information that can be directly decoded
|
||||
type ExtFileInit struct {
|
||||
BlockStart uint32
|
||||
Size uint32
|
||||
BlockStart uint64
|
||||
Size uint64
|
||||
Sparse uint64
|
||||
HardLinks uint32
|
||||
FragmentIndex uint32
|
||||
@@ -164,8 +164,8 @@ func NewExtendedFile(rdr io.Reader, blockSize uint32) (ExtFile, error) {
|
||||
return inode, err
|
||||
}
|
||||
inode.Fragmented = inode.FragmentIndex != 0xFFFFFFFF
|
||||
blocks := inode.Size / blockSize
|
||||
if inode.Size%blockSize > 0 {
|
||||
blocks := inode.Size / uint64(blockSize)
|
||||
if inode.Size%uint64(blockSize) > 0 {
|
||||
blocks++
|
||||
}
|
||||
inode.BlockSizes = make([]uint32, blocks, blocks)
|
||||
|
||||
Reference in New Issue
Block a user