Commit 42f12e1c authored by Han-Wen Nienhuys's avatar Han-Wen Nienhuys

AutoUnionFs: respond with ENOENT even when asking for a known

mount point.
parent 4f1e55f2
package unionfs package unionfs
import ( import (
"fmt"
"github.com/hanwen/go-fuse/fuse" "github.com/hanwen/go-fuse/fuse"
"log" "log"
"os" "os"
...@@ -276,12 +275,6 @@ func (me *AutoUnionFs) GetAttr(path string) (*os.FileInfo, fuse.Status) { ...@@ -276,12 +275,6 @@ func (me *AutoUnionFs) GetAttr(path string) (*os.FileInfo, fuse.Status) {
return a, fuse.OK return a, fuse.OK
} }
if me.getUnionFs(path) != nil {
return &os.FileInfo{
Mode: fuse.S_IFDIR | 0755,
},fuse.OK
}
return nil, fuse.ENOENT return nil, fuse.ENOENT
} }
...@@ -315,6 +308,7 @@ func (me *AutoUnionFs) Open(path string, flags uint32) (fuse.File, fuse.Status) ...@@ -315,6 +308,7 @@ func (me *AutoUnionFs) Open(path string, flags uint32) (fuse.File, fuse.Status)
} }
return nil, fuse.ENOENT return nil, fuse.ENOENT
} }
func (me *AutoUnionFs) Truncate(name string, offset uint64) (code fuse.Status) { func (me *AutoUnionFs) Truncate(name string, offset uint64) (code fuse.Status) {
if name != filepath.Join(_CONFIG, _SCAN_CONFIG) { if name != filepath.Join(_CONFIG, _SCAN_CONFIG) {
log.Println("Huh? Truncating unsupported write file", name) log.Println("Huh? Truncating unsupported write file", name)
...@@ -332,8 +326,8 @@ func (me *AutoUnionFs) OpenDir(name string) (stream chan fuse.DirEntry, status f ...@@ -332,8 +326,8 @@ func (me *AutoUnionFs) OpenDir(name string) (stream chan fuse.DirEntry, status f
name = "" name = ""
case "": case "":
default: default:
log.Sprintf("Argh! Don't know how to list dir %v", name) log.Printf("Argh! Don't know how to list dir %v", name)
return fuse.ENOSYS return nil, fuse.ENOSYS
} }
me.lock.RLock() me.lock.RLock()
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment