Skip to content

Commit a27d9d8

Browse files
committed
fix: add missing operation to fs path error
Signed-off-by: Billy Zha <[email protected]>
1 parent c8c2048 commit a27d9d8

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

internal/fs/tarfs/tarfs.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -108,11 +108,11 @@ func (tfs *TarFS) Stat(name string) (fs.FileInfo, error) {
108108
// getEntry returns the named entry.
109109
func (tfs *TarFS) getEntry(name string) (*entry, error) {
110110
if !fs.ValidPath(name) {
111-
return nil, &fs.PathError{Path: name, Err: fs.ErrInvalid}
111+
return nil, &fs.PathError{Op: "open", Path: name, Err: fs.ErrInvalid}
112112
}
113113
entry, ok := tfs.entries[name]
114114
if !ok {
115-
return nil, &fs.PathError{Path: name, Err: fs.ErrNotExist}
115+
return nil, &fs.PathError{Op: "open", Path: name, Err: fs.ErrNotExist}
116116
}
117117
if entry.header.Typeflag != tar.TypeReg {
118118
// support regular files only

0 commit comments

Comments
 (0)