From 8f5e1fef963d56b1d699e3768c62196e779b95c6 Mon Sep 17 00:00:00 2001 From: Caleb Gardner Date: Sat, 18 Jun 2022 14:40:33 -0500 Subject: [PATCH] NEW ISSUES --- exp_test.go | 6 +++--- internal/inode/file.go | 2 ++ squashfs_test.go | 3 +-- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/exp_test.go b/exp_test.go index cdca880..9d6ac62 100644 --- a/exp_test.go +++ b/exp_test.go @@ -290,9 +290,9 @@ func TestSTUFF(t *testing.T) { if err != nil { t.Fatal(err) } - os.Remove(wd + "/testing/test.xml") - testOut, _ := os.Create(wd + "/testing/test.xml") - testFil, err := rdr.Open("PortableApps/Notepad++Portable/App/Notepad++64/functionList/cobol-free.xml") + os.Remove(wd + "/testing/test.ini") + testOut, _ := os.Create(wd + "/testing/test.ini") + testFil, err := rdr.Open("Documents/Pictures/Desktop.ini") if err != nil { t.Fatal(err) } diff --git a/internal/inode/file.go b/internal/inode/file.go index 57b5f33..a5f5679 100644 --- a/internal/inode/file.go +++ b/internal/inode/file.go @@ -2,6 +2,7 @@ package inode import ( "encoding/binary" + "fmt" "io" "math" ) @@ -36,6 +37,7 @@ type EFile struct { func ReadFile(r io.Reader, blockSize uint32) (f File, err error) { err = binary.Read(r, binary.LittleEndian, &f.fileInit) if err != nil { + fmt.Println("Hi") return } f.BlockSizes = make([]uint32, int(math.Ceil(float64(f.Size)/float64(blockSize)))) diff --git a/squashfs_test.go b/squashfs_test.go index a7ef612..41cd995 100644 --- a/squashfs_test.go +++ b/squashfs_test.go @@ -73,8 +73,7 @@ func TestExtractQuick(t *testing.T) { } op := squashfs.DefaultOptions() op.Verbose = true - sub, _ := rdr.Sub("PortableApps/Notepad++Portable/App/Notepad++64/functionList") - err = sub.(*squashfs.FS).ExtractWithOptions(libPath, op) + err = rdr.ExtractWithOptions(libPath, op) if err != nil { t.Fatal(err) }