Updating test data, getting rid of redundant arguments

This commit is contained in:
Alex Yatskov 2015-05-16 16:12:39 +09:00
parent ed108335ac
commit 3ab3960a6d
3 changed files with 5 additions and 5 deletions

View File

View File

@ -1,3 +1,3 @@
{ {
"deleted": ["/test_dir/poopy"] "deleted": ["/test_dira"]
} }

View File

@ -123,8 +123,8 @@ func (this *version) scanDir(path string) (map[string]versionedNode, error) {
return baseNodes, nil return baseNodes, nil
} }
func (this *version) buildVerDir(path string, dir *versionedDir) error { func (this *version) buildVerDir(dir *versionedDir) error {
nodes, err := this.scanDir(path) nodes, err := this.scanDir(dir.node.path)
if err != nil { if err != nil {
return err return err
} }
@ -132,7 +132,7 @@ func (this *version) buildVerDir(path string, dir *versionedDir) error {
for name, node := range nodes { for name, node := range nodes {
if node.info.IsDir() { if node.info.IsDir() {
subDir := newVersionedDir(node, this.allocInode()) subDir := newVersionedDir(node, this.allocInode())
if err := this.buildVerDir(filepath.Join(path, name), subDir); err != nil { if err := this.buildVerDir(subDir); err != nil {
return err return err
} }
@ -155,7 +155,7 @@ func (this *version) resolve() error {
versionedNode{"/", node, this}, versionedNode{"/", node, this},
this.allocInode()) this.allocInode())
return this.buildVerDir("/", this.root) return this.buildVerDir(this.root)
} }
func (this *version) metadataPath() string { func (this *version) metadataPath() string {