Store shadow nodes
This commit is contained in:
parent
fddafc01d6
commit
6343fa4d89
3
node.go
3
node.go
@ -34,6 +34,7 @@ type versionedNode struct {
|
||||
path string
|
||||
info os.FileInfo
|
||||
ver *version
|
||||
shadow *versionedNode
|
||||
}
|
||||
|
||||
type versionedNodeMap map[string]*versionedNode
|
||||
@ -48,7 +49,7 @@ func newVersionedNode(path string, ver *version) (*versionedNode, error) {
|
||||
}
|
||||
|
||||
func newVersionedNodeStat(path string, ver *version, info os.FileInfo) *versionedNode {
|
||||
return &versionedNode{path, info, ver}
|
||||
return &versionedNode{path, info, ver, nil}
|
||||
}
|
||||
|
||||
func (this *versionedNode) rebasedPath() string {
|
||||
|
@ -114,6 +114,7 @@ func (this *version) scanDir(path string) (versionedNodeMap, error) {
|
||||
}
|
||||
|
||||
for ownName, ownNode := range ownNodes {
|
||||
ownNode.shadow = baseNodes[ownName]
|
||||
baseNodes[ownName] = ownNode
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user