(parent *os.Root, name string)
| 452 | } |
| 453 | |
| 454 | func (r *Root) redirectTargetIsDir(parent *os.Root, name string) (bool, error) { |
| 455 | info, err := r.stat(parent, name) |
| 456 | if os.IsNotExist(err) { |
| 457 | return false, nil |
| 458 | } |
| 459 | if err != nil { |
| 460 | return false, fmt.Errorf("could not safely classify redirect target %q: %w", name, err) |
| 461 | } |
| 462 | return info.IsDir(), nil |
| 463 | } |
| 464 | |
| 465 | func directoryWriteError(path string) error { |
| 466 | return &os.PathError{Op: "open", Path: path, Err: syscall.EISDIR} |