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.
This commit is contained in:
Jakob Unterwurzacher 2019-11-03 20:38:15 +01:00
parent 3b67bc5711
commit e4148028af
1 changed files with 0 additions and 5 deletions

View File

@ -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
}