From 1c7ae21c607bedc7e9669ce95b5733f385ed86d2 Mon Sep 17 00:00:00 2001 From: Han-Wen Nienhuys <hanwen@google.com> Date: Wed, 11 May 2011 19:19:01 -0300 Subject: [PATCH] Only generate a negative entry when negative timeouts are configured. --- fuse/pathops.go | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/fuse/pathops.go b/fuse/pathops.go index db45a0b..34581d8 100644 --- a/fuse/pathops.go +++ b/fuse/pathops.go @@ -42,8 +42,12 @@ func (me *FileSystemConnector) internalLookupWithNode(parent *inode, name string // Init. fullPath, mount := parent.GetPath() if mount == nil { - rootMount := me.rootNode.mount - return NegativeEntry(rootMount.options.NegativeTimeout), OK, nil + timeout := me.rootNode.mount.options.NegativeTimeout + if timeout > 0 { + return NegativeEntry(timeout), OK, nil + } else { + return nil, ENOENT, nil + } } fullPath = filepath.Join(fullPath, name) -- 2.30.9