Fixed Extended Files

This commit is contained in:
Caleb Gardner
2021-01-16 03:09:48 -06:00
parent 80946f58e7
commit 17e1d65488
3 changed files with 15 additions and 18 deletions
+4 -4
View File
@@ -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)