Improved deletion
This commit is contained in:
parent
9258b1d6fc
commit
205192f394
6
node.go
6
node.go
@ -57,13 +57,17 @@ func newVersionedNodeStat(path string, ver *version, parent *versionedNode, info
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (this *versionedNode) remove() error {
|
func (this *versionedNode) remove() error {
|
||||||
|
ver := this.ver
|
||||||
|
|
||||||
if this.versioned {
|
if this.versioned {
|
||||||
if err := os.Remove(this.rebasedPath()); err != nil {
|
if err := os.Remove(this.rebasedPath()); err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ver = ver.parent
|
||||||
}
|
}
|
||||||
|
|
||||||
this.ver.removePath(this.path)
|
ver.removePath(this.path)
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user