fuse: fix crash populating non-permanode camliPath

https://code.google.com/p/camlistore/issues/detail?id=440

Change-Id: If3b186d03a29ea6b3c9f0945173ede8709e318d6
This commit is contained in:
Eric Drechsel 2014-05-08 15:16:45 -07:00
parent 772be1319a
commit 7e11b360a3
1 changed files with 4 additions and 0 deletions

View File

@ -153,6 +153,10 @@ func (n *mutDir) populate() error {
log.Printf("child not described: %v", childRef)
continue
}
if child.Permanode == nil {
log.Printf("invalid child, not a permanode: %v", childRef)
continue
}
if target := child.Permanode.Attr.Get("camliSymlinkTarget"); target != "" {
// This is a symlink.
n.maybeAddChild(name, child.Permanode, &mutFile{