Skip to content

Commit

Permalink
fix: add missing operation to fs path error
Browse files Browse the repository at this point in the history
Signed-off-by: Billy Zha <[email protected]>
  • Loading branch information
qweeah committed Jul 25, 2024
1 parent c8c2048 commit a27d9d8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions internal/fs/tarfs/tarfs.go
Original file line number Diff line number Diff line change
Expand Up @@ -108,11 +108,11 @@ func (tfs *TarFS) Stat(name string) (fs.FileInfo, error) {
// getEntry returns the named entry.
func (tfs *TarFS) getEntry(name string) (*entry, error) {
if !fs.ValidPath(name) {
return nil, &fs.PathError{Path: name, Err: fs.ErrInvalid}
return nil, &fs.PathError{Op: "open", Path: name, Err: fs.ErrInvalid}
}
entry, ok := tfs.entries[name]
if !ok {
return nil, &fs.PathError{Path: name, Err: fs.ErrNotExist}
return nil, &fs.PathError{Op: "open", Path: name, Err: fs.ErrNotExist}
}
if entry.header.Typeflag != tar.TypeReg {
// support regular files only
Expand Down

0 comments on commit a27d9d8

Please sign in to comment.