NEW ISSUES

This commit is contained in:
Caleb Gardner
2022-06-18 14:40:33 -05:00
parent 49595de3f2
commit 8f5e1fef96
3 changed files with 6 additions and 5 deletions
+3 -3
View File
@@ -290,9 +290,9 @@ func TestSTUFF(t *testing.T) {
if err != nil { if err != nil {
t.Fatal(err) t.Fatal(err)
} }
os.Remove(wd + "/testing/test.xml") os.Remove(wd + "/testing/test.ini")
testOut, _ := os.Create(wd + "/testing/test.xml") testOut, _ := os.Create(wd + "/testing/test.ini")
testFil, err := rdr.Open("PortableApps/Notepad++Portable/App/Notepad++64/functionList/cobol-free.xml") testFil, err := rdr.Open("Documents/Pictures/Desktop.ini")
if err != nil { if err != nil {
t.Fatal(err) t.Fatal(err)
} }
+2
View File
@@ -2,6 +2,7 @@ package inode
import ( import (
"encoding/binary" "encoding/binary"
"fmt"
"io" "io"
"math" "math"
) )
@@ -36,6 +37,7 @@ type EFile struct {
func ReadFile(r io.Reader, blockSize uint32) (f File, err error) { func ReadFile(r io.Reader, blockSize uint32) (f File, err error) {
err = binary.Read(r, binary.LittleEndian, &f.fileInit) err = binary.Read(r, binary.LittleEndian, &f.fileInit)
if err != nil { if err != nil {
fmt.Println("Hi")
return return
} }
f.BlockSizes = make([]uint32, int(math.Ceil(float64(f.Size)/float64(blockSize)))) f.BlockSizes = make([]uint32, int(math.Ceil(float64(f.Size)/float64(blockSize))))
+1 -2
View File
@@ -73,8 +73,7 @@ func TestExtractQuick(t *testing.T) {
} }
op := squashfs.DefaultOptions() op := squashfs.DefaultOptions()
op.Verbose = true op.Verbose = true
sub, _ := rdr.Sub("PortableApps/Notepad++Portable/App/Notepad++64/functionList") err = rdr.ExtractWithOptions(libPath, op)
err = sub.(*squashfs.FS).ExtractWithOptions(libPath, op)
if err != nil { if err != nil {
t.Fatal(err) t.Fatal(err)
} }