Skip to content

Commit

Permalink
fix path while prereading parent dir
Browse files Browse the repository at this point in the history
  • Loading branch information
likeazir committed Oct 9, 2023
1 parent d971816 commit 871e6ca
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion internal/pkg/cacheclient/cacheclient.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import (
"github.com/hashicorp/golang-lru/v2/expirable"
"github.com/rs/zerolog/log"
"io/fs"
"path/filepath"
"readnetfs/internal/pkg/fsclient"
"sync"
"syscall"
Expand Down Expand Up @@ -109,7 +110,7 @@ func (c *CacheClient) FileInfo(path fsclient.RemotePath) (fs.FileInfo, error) {
func() {
c.dirContentLock.Lock()
defer c.dirContentLock.Unlock()
infos, err := c.client.ReadDir(path)
infos, err := c.client.ReadDir(fsclient.RemotePath(filepath.Dir(string(path))))
if err != nil {
return
}
Expand Down

0 comments on commit 871e6ca

Please sign in to comment.