Commit ef9991c3 authored by Han-Wen Nienhuys's avatar Han-Wen Nienhuys

ZipFs: deal correctly with trying to OpenDir a non-existing directory.

parent d7ff0b6c
......@@ -120,11 +120,11 @@ func (me *MemTreeFileSystem) Open(name string, flags uint32) (fuseFile fuse.File
func (me *MemTreeFileSystem) OpenDir(name string) (stream chan fuse.DirEntry, code fuse.Status) {
dir, file := me.tree.Lookup(name)
if file != nil {
return nil, fuse.ENOSYS
}
if dir == nil {
panic("dir")
return nil, fuse.ENOENT
}
if file != nil {
return nil, fuse.ENOTDIR
}
stream = make(chan fuse.DirEntry, len(dir.files)+len(dir.subdirs))
......
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