FILE EXTRACTION WORKS!

This commit is contained in:
Caleb Gardner
2020-11-25 04:26:48 -06:00
parent af36f9b9aa
commit f0f32a2445
4 changed files with 58 additions and 39 deletions
+4 -3
View File
@@ -13,7 +13,7 @@ import (
const (
downloadURL = "https://github.com/zilti/code-oss.AppImage/releases/download/continuous/Code_OSS-x86_64.AppImage"
appImageName = "Code_OSS.AppImage"
squashfsName = "Code_OSS.Squashfs"
squashfsName = "testing.squashfs"
)
func TestMain(t *testing.T) {
@@ -38,7 +38,7 @@ func TestMain(t *testing.T) {
}
//testing code to print out the directory structure
// rdr.GetFileStructure()
extractionFil := "code-oss.desktop"
extractionFil := "Proton-5.9-GE-8-ST.tar.gz"
os.Remove(wd + "/testing/" + extractionFil)
desk, err := os.Create(wd + "/testing/" + extractionFil)
if err != nil {
@@ -48,7 +48,8 @@ func TestMain(t *testing.T) {
if err != nil {
t.Fatal(err)
}
n, err := io.Copy(desk, ext)
fmt.Println("Size!", ext.FileSize)
n, err := io.CopyBuffer(desk, ext, make([]byte, rdr.super.BlockSize/2))
if err != nil {
fmt.Println("Read", n)
t.Fatal(err)