mirror of https://github.com/perkeep/perkeep.git
cammount: check that input is a directory blobref
Change-Id: I9b33f2ae31ef902e01ddaa0504e1c960bb4e3640
This commit is contained in:
parent
0b15eb0cc8
commit
2d4f37176c
|
@ -82,6 +82,9 @@ func NewRootedCamliFileSystem(fetcher blobref.SeekFetcher, root *blobref.BlobRef
|
|||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if ss.Type != "directory" {
|
||||
return nil, fmt.Errorf("Blobref must be of a directory, got a %v", ss.Type)
|
||||
}
|
||||
n := &node{fs: fs, blobref: root, ss: ss}
|
||||
n.populateAttr()
|
||||
fs.root = n
|
||||
|
|
Loading…
Reference in New Issue