diff options
Diffstat (limited to 'internal')
-rw-r--r-- | internal/fusefrontend/fs_dir.go | 16 |
1 files changed, 0 insertions, 16 deletions
diff --git a/internal/fusefrontend/fs_dir.go b/internal/fusefrontend/fs_dir.go index 773e389..ad35f93 100644 --- a/internal/fusefrontend/fs_dir.go +++ b/internal/fusefrontend/fs_dir.go @@ -299,7 +299,6 @@ func (fs *FS) OpenDir(dirName string, context *fuse.Context) ([]fuse.DirEntry, f } // Decrypted directory entries var plain []fuse.DirEntry - var errorCount int // Filter and decrypt filenames for i := range cipherEntries { cName := cipherEntries[i].Name @@ -326,7 +325,6 @@ func (fs *FS) OpenDir(dirName string, context *fuse.Context) ([]fuse.DirEntry, f tlog.Warn.Printf("OpenDir %q: invalid entry %q: Could not read .name: %v", cDirName, cName, err) fs.reportMitigatedCorruption(cName) - errorCount++ continue } cName = cNameLong @@ -339,12 +337,6 @@ func (fs *FS) OpenDir(dirName string, context *fuse.Context) ([]fuse.DirEntry, f tlog.Warn.Printf("OpenDir %q: invalid entry %q: %v", cDirName, cName, err) fs.reportMitigatedCorruption(cName) - if runtime.GOOS == "darwin" && cName == dsStoreName { - // MacOS creates lots of these files. Log the warning but don't - // increment errorCount - does not warrant returning EIO. - continue - } - errorCount++ continue } // Override the ciphertext name with the plaintext name but reuse the rest @@ -353,13 +345,5 @@ func (fs *FS) OpenDir(dirName string, context *fuse.Context) ([]fuse.DirEntry, f plain = append(plain, cipherEntries[i]) } - if errorCount > 0 && len(plain) == 0 { - // Don't let the user stare on an empty directory. Report that things went - // wrong. - tlog.Warn.Printf("OpenDir %q: all %d entries were invalid, returning EIO", - cDirName, errorCount) - status = fuse.EIO - } - return plain, status } |