Store shadow nodes
This commit is contained in:
parent
fddafc01d6
commit
6343fa4d89
9
node.go
9
node.go
@ -31,9 +31,10 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
type versionedNode struct {
|
type versionedNode struct {
|
||||||
path string
|
path string
|
||||||
info os.FileInfo
|
info os.FileInfo
|
||||||
ver *version
|
ver *version
|
||||||
|
shadow *versionedNode
|
||||||
}
|
}
|
||||||
|
|
||||||
type versionedNodeMap map[string]*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 {
|
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 {
|
func (this *versionedNode) rebasedPath() string {
|
||||||
|
@ -114,6 +114,7 @@ func (this *version) scanDir(path string) (versionedNodeMap, error) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
for ownName, ownNode := range ownNodes {
|
for ownName, ownNode := range ownNodes {
|
||||||
|
ownNode.shadow = baseNodes[ownName]
|
||||||
baseNodes[ownName] = ownNode
|
baseNodes[ownName] = ownNode
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user