code: func pruneEmptyDirs(root string, leaf string) (err error) {
  	rootInfo, err := os.Stat(root)
  	if err != nil {
  		return
  	}
  	for {
  		var leafInfo os.FileInfo
  		leafInfo, err = os.Stat(leaf)
  		if os.IsNotExist(err) {
  			goto parent
  		}
  		if err != nil {
  			return
  		}
  		if !leafInfo.IsDir() {
  			return
  		}
  		if os.SameFile(rootInfo, leafInfo) {
  			return
  		}
  		if os.Remove(leaf) != nil {
  			return
  		}
  	parent:
  		leaf = filepath.Dir(leaf)
  	}
  }
docs: // Leaf is a descendent of root.