code: func recoverSymlinkPath(p string) string {
  	// A/.cipd/pkgs/<name>/<id>/b/c/d => A/b/c/d. (at least 5 components)
  	chunks := strings.Split(p, string(filepath.Separator))
  	if len(chunks) < 5 {
  		return ""
  	}
  	// Search for .cipd to find site root.
  	var i int
  	for i = len(chunks) - 1; i >= 0; i-- {
  		if chunks[i] == ".cipd" {
  			break
  		}
  	}
  	if i == -1 {
  		return ""
  	}
  	// Must have at least ".cipd/pkgs/<name>/<id>/...".
  	if len(chunks)-i <= 4 {
  		return ""
  	}
  	// Cut out .cipd/pkgs/<name>/<id> to get A/b/c/d.
  	return strings.Join(append(chunks[:i], chunks[i+4:]...), string(filepath.Separator))
  }
docs: // recoverSymlinkPath guesses the path to a symlink in CIPD package site root
  // given an absolute path to a file in .cipd/* guts. Returns "" if given path
  // is not inside .cipd/*. Knows about .cipd/* directory layout.