To reduce bot traffic you must login to view /lordwelch/comic-hasher/src/commit/bb64d8449c0fbb65d82bc09792d662e9d8daecae/cmd.
The GitHub login only links via username.
Files
Timmy Welch e374614124 Move hashing code into ch/ and comic-hasher to the repo root
So `go install gitea.narnian.us/lordwelch/comic-hasher@latest` works
2026-11-05 16:28:41 -08:00

22 lines
355 B
Go

package ch
import (
"os"
"path/filepath"
)
func RmdirP(path string) error {
err := os.Remove(path)
if err != nil {
return err
}
for path != "" {
dir, _ := filepath.Split(path)
err := os.Remove(dir)
if err != nil {
return nil // We only care about errors for the first directory we always expect atleast one to fail
}
}
return nil
}