Started work on proper tests.

STILL HAVING STUPID UNEXPLAINABLE NIL POINTERS.
This commit is contained in:
Caleb Gardner
2022-06-18 01:32:51 -05:00
parent 8613e35221
commit cde6a265a1
6 changed files with 121 additions and 22 deletions
+3 -6
View File
@@ -101,7 +101,7 @@ func (f *File) ReadDir(n int) (out []fs.DirEntry, err error) {
err = io.EOF
}
}
var fi FileInfo
var fi fileInfo
for _, e := range ents[start:end] {
fi, err = f.r.newFileInfo(e)
if err != nil {
@@ -190,10 +190,7 @@ type ExtractionOptions struct {
//DefaultOptions is the default ExtractionOptions.
func DefaultOptions() ExtractionOptions {
return ExtractionOptions{
DereferenceSymlink: false,
UnbreakSymlink: false,
Verbose: false,
FolderPerm: fs.ModePerm,
FolderPerm: 0755,
}
}
@@ -208,7 +205,7 @@ func (f File) ExtractTo(folder string) error {
func (f File) ExtractSymlink(folder string) error {
return f.ExtractWithOptions(folder, ExtractionOptions{
DereferenceSymlink: true,
FolderPerm: fs.ModePerm,
FolderPerm: 0755,
})
}