From e4148028af1f113bfdec00f3c577ef2d428a6aad Mon Sep 17 00:00:00 2001 From: Jakob Unterwurzacher Date: Sun, 3 Nov 2019 20:38:15 +0100 Subject: [PATCH] fusefrontend: warn about missing diriv The comment is outdated, at this point, we should really not get any errors from ReadDirIVAt. The change is best seen when running the fsck tests. Before: fsck: error opening dir "missing_diriv": 2=no such file or directory After: OpenDir "K2m0E6qzIfoLkVZJanoUiQ": could not read gocryptfs.diriv: no such file or directory fsck: error opening dir "missing_diriv": 5=input/output error See https://github.com/rfjakob/gocryptfs/issues/403 , where the extra info would have been helpful. --- internal/fusefrontend/fs_dir.go | 5 ----- 1 file changed, 5 deletions(-) diff --git a/internal/fusefrontend/fs_dir.go b/internal/fusefrontend/fs_dir.go index ad35f93..151af6a 100644 --- a/internal/fusefrontend/fs_dir.go +++ b/internal/fusefrontend/fs_dir.go @@ -288,11 +288,6 @@ func (fs *FS) OpenDir(dirName string, context *fuse.Context) ([]fuse.DirEntry, f // Read the DirIV from disk cachedIV, err = nametransform.ReadDirIVAt(fd) if err != nil { - // The directory itself does not exist - if err == syscall.ENOENT { - return nil, fuse.ENOENT - } - // Any other problem warrants an error message tlog.Warn.Printf("OpenDir %q: could not read %s: %v", cDirName, nametransform.DirIVFilename, err) return nil, fuse.EIO }