Skip to content

Commit

Permalink
reset if offset rewind
Browse files Browse the repository at this point in the history
Signed-off-by: jiefenghuang <[email protected]>
  • Loading branch information
jiefenghuang committed Sep 30, 2024
1 parent db74e04 commit 64c0561
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion pkg/vfs/vfs.go
Original file line number Diff line number Diff line change
Expand Up @@ -424,7 +424,11 @@ func (v *VFS) Readdir(ctx Context, ino Ino, size uint32, off int, fh uint64, plu
h.Lock()
defer h.Unlock()

if h.dirStream == nil {
if h.dirStream == nil || off == 0 {
if h.dirStream != nil {
h.dirStream.Close()
h.dirStream = nil
}
var initEntries []*meta.Entry
if ino == rootID && !v.Conf.HideInternal {
for _, node := range internalNodes[1:] {
Expand Down

0 comments on commit 64c0561

Please sign in to comment.