aboutsummaryrefslogtreecommitdiff
path: root/internal/fusefrontend
diff options
context:
space:
mode:
Diffstat (limited to 'internal/fusefrontend')
-rw-r--r--internal/fusefrontend/fs_dir.go6
1 files changed, 6 insertions, 0 deletions
diff --git a/internal/fusefrontend/fs_dir.go b/internal/fusefrontend/fs_dir.go
index 211eeea..c87cc02 100644
--- a/internal/fusefrontend/fs_dir.go
+++ b/internal/fusefrontend/fs_dir.go
@@ -7,6 +7,7 @@ import (
"io"
"os"
"path/filepath"
+ "sync"
"syscall"
"github.com/hanwen/go-fuse/fuse"
@@ -234,6 +235,8 @@ func (fs *FS) Rmdir(path string, context *fuse.Context) (code fuse.Status) {
return fuse.OK
}
+var haveGetdentsWarnOnce sync.Once
+
// OpenDir implements pathfs.FileSystem
func (fs *FS) OpenDir(dirName string, context *fuse.Context) ([]fuse.DirEntry, fuse.Status) {
tlog.Debug.Printf("OpenDir(%s)", dirName)
@@ -252,6 +255,9 @@ func (fs *FS) OpenDir(dirName string, context *fuse.Context) ([]fuse.DirEntry, f
return nil, fuse.ToStatus(err)
}
} else {
+ haveGetdentsWarnOnce.Do(func() {
+ tlog.Warn.Printf("OpenDir: Getdents not available, falling back to OpenDir")
+ })
cipherEntries, status = fs.FileSystem.OpenDir(cDirName, context)
if !status.Ok() {
return nil, status