From d3764b775395faa31afb1db34c5c2814a0e9af09 Mon Sep 17 00:00:00 2001 From: Jakob Unterwurzacher Date: Thu, 10 Nov 2016 23:25:37 +0100 Subject: reverse: fix longname decoding bug This could have caused spurious ENOENT errors. That it did not cause these errors all the time is interesting and probably because an earlier readdir would place the entry in the cache. This masks the bug. --- internal/fusefrontend_reverse/reverse_longnames.go | 2 ++ 1 file changed, 2 insertions(+) (limited to 'internal/fusefrontend_reverse/reverse_longnames.go') diff --git a/internal/fusefrontend_reverse/reverse_longnames.go b/internal/fusefrontend_reverse/reverse_longnames.go index 96fa613..0234397 100644 --- a/internal/fusefrontend_reverse/reverse_longnames.go +++ b/internal/fusefrontend_reverse/reverse_longnames.go @@ -11,6 +11,7 @@ import ( "github.com/hanwen/go-fuse/fuse/nodefs" "github.com/rfjakob/gocryptfs/internal/nametransform" + "github.com/rfjakob/gocryptfs/internal/tlog" ) const ( @@ -49,6 +50,7 @@ func (rfs *ReverseFS) findLongnameParent(dir string, dirIV []byte, longname stri absDir := filepath.Join(rfs.args.Cipherdir, dir) dirfd, err := os.Open(absDir) if err != nil { + tlog.Warn.Printf("findLongnameParent: opendir failed: %v\n", err) return "", err } dirEntries, err := dirfd.Readdirnames(-1) -- cgit v1.2.3