A couple of fixes.

GetChildrenRecursively is no longer threaded so it's more consistent
Fixed GetFileAtPath, specifically when getting the root dir
This commit is contained in:
Caleb Gardner
2021-01-15 10:57:03 -06:00
parent 9cf92c4916
commit 4187598783
3 changed files with 32 additions and 35 deletions
+7 -7
View File
@@ -76,14 +76,14 @@ func TestAppImage(t *testing.T) {
if err != nil {
t.Fatal(err)
}
errs := rdr.ExtractTo(wd + "/testing/firefox")
if len(errs) > 0 {
t.Fatal(errs)
rt := rdr.GetFileAtPath("/")
fils, err := rt.GetChildrenRecursively()
if err != nil {
t.Fatal(err)
}
for _, fil := range fils {
fmt.Println(fil.Path())
}
// os.RemoveAll(wd + "/testing/" + appImageName + ".d")
// root, _ := rdr.GetRootFolder()
// errs := root.ExtractWithOptions(wd+"/testing/"+appImageName+".d", true, os.ModePerm, true)
// t.Fatal(errs)
fmt.Println(time.Since(start))
t.Fatal("No problemo!")
}