Skip to content

Commit

Permalink
docs(image): fix the comment on the soft/hard link (#4740)
Browse files Browse the repository at this point in the history
* Update tar.go

The comment before the following w.processFile(filePath, tr, hdr.FileInfo(), analyzeFn) call says: // A symbolic/hard link or regular file will reach here. 
But defualt's processing causes the symbolic/hard link to not reach the processFile function location

* Update tar.go

update tar.go comment

---------

Co-authored-by: knqyf263 <[email protected]>
  • Loading branch information
zunlongzhou and knqyf263 authored Jul 6, 2023
1 parent e5bee5c commit 3c16ca8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/fanal/walker/tar.go
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ func (w LayerTar) Walk(layer io.Reader, analyzeFn WalkFunc) ([]string, []string,
continue
}

// A symbolic/hard link or regular file will reach here.
// A regular file will reach here.
if err = w.processFile(filePath, tr, hdr.FileInfo(), analyzeFn); err != nil {
return nil, nil, xerrors.Errorf("failed to process the file: %w", err)
}
Expand Down

0 comments on commit 3c16ca8

Please sign in to comment.