Skip to content

Commit

Permalink
adapt the fakefs reader
Browse files Browse the repository at this point in the history
  • Loading branch information
simulot committed Jul 30, 2024
1 parent 7e8875d commit 31cbfae
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions internal/fakefs/ziplist.go
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,19 @@ func ScanFileListReader(f io.Reader, dateFormat string) ([]fs.FS, error) {
}
continue
}
if strings.HasPrefix(l, "Archive:") {
currentZip = strings.TrimSpace(strings.TrimPrefix(l, "Archive:"))
fsys, ok = fsyss[currentZip]
if !ok {
fsys = &FakeFS{
name: currentZip,
files: map[string]map[string]FakeDirEntry{},
}

fsyss[currentZip] = fsys
}
continue
}
if name, size, modTime := readFileLine(l, dateFormat); name != "" {
fsys.addFile(name, size, modTime)
}
Expand Down

0 comments on commit 31cbfae

Please sign in to comment.