Improved deletion

This commit is contained in:
Alex Yatskov 2015-06-16 18:12:04 +09:00
parent 9258b1d6fc
commit 205192f394

View File

@ -57,13 +57,17 @@ func newVersionedNodeStat(path string, ver *version, parent *versionedNode, info
}
func (this *versionedNode) remove() error {
ver := this.ver
if this.versioned {
if err := os.Remove(this.rebasedPath()); err != nil {
return err
}
ver = ver.parent
}
this.ver.removePath(this.path)
ver.removePath(this.path)
return nil
}