Commit 708a5d57 authored by Han-Wen Nienhuys's avatar Han-Wen Nienhuys

UnionFs: always have attr != nil if code == OK.

parent 1320c601
...@@ -336,7 +336,7 @@ func (me *UnionFs) Symlink(pointedTo string, linkName string) (code fuse.Status) ...@@ -336,7 +336,7 @@ func (me *UnionFs) Symlink(pointedTo string, linkName string) (code fuse.Status)
code = me.fileSystems[0].Symlink(pointedTo, linkName) code = me.fileSystems[0].Symlink(pointedTo, linkName)
if code.Ok() { if code.Ok() {
me.removeDeletion(linkName) me.removeDeletion(linkName)
me.branchCache.Set(linkName, branchResult{nil, fuse.OK, 0}) me.branchCache.GetFresh(linkName)
} }
return code return code
} }
...@@ -571,9 +571,6 @@ func (me *UnionFs) GetAttr(name string) (a *os.FileInfo, s fuse.Status) { ...@@ -571,9 +571,6 @@ func (me *UnionFs) GetAttr(name string) (a *os.FileInfo, s fuse.Status) {
if r.branch < 0 { if r.branch < 0 {
return nil, fuse.ENOENT return nil, fuse.ENOENT
} }
if r.attr == nil {
return me.fileSystems[r.branch].GetAttr(name)
}
return r.attr, r.code return r.attr, r.code
} }
......
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