Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions accessors/zip/zip.go
Original file line number Diff line number Diff line change
Expand Up @@ -429,6 +429,10 @@ func (self *ZipFileCache) GetChildren(

loop:
for _, cd_cache := range self.lookup {
cd_components := cd_cache.full_path.Components
if len(cd_components) <= len(full_path.Components) {
continue loop
}
// This breaks if the cd component does not have the same
// prefix as required.
for j, component := range full_path.Components {
Expand All @@ -442,12 +446,12 @@ loop:

// The required directory depth we need.
depth := len(full_path.Components)
if len(cd_cache.full_path.Components) <= depth {
if len(cd_components) <= depth {
continue
}

// Get the part of the path that is at the required depth.
member_name := normalizer(cd_cache.full_path.Components[depth])
member_name := normalizer(cd_components[depth])

// Have we seen this before?
old_result, pres := seen[member_name]
Expand Down
Loading