yorukot/superfile · error
could not find a free trash name for %s
Error message
could not find a free trash name for %s
What it means
Error "could not find a free trash name for %s" thrown in yorukot/superfile.
Source
Thrown at src/internal/trash/trash_linux.go:264
file, err := os.OpenFile(infoPath, os.O_WRONLY|os.O_CREATE|os.O_EXCL, 0o600)
if os.IsExist(err) {
continue
}
if err != nil {
return "", "", "", err
}
if _, err := file.WriteString(content); err != nil {
_ = file.Close()
_ = os.Remove(infoPath)
return "", "", "", err
}
if err := file.Close(); err != nil {
_ = os.Remove(infoPath)
return "", "", "", err
}
return name, infoPath, filesPath, nil
}
return "", "", "", fmt.Errorf("could not find a free trash name for %s", srcAbs)
}
func candidateTrashName(base string, attempt int) string {
if attempt == 0 && len(base) <= maxTrashEntryNameBytes {
return base
}
hash := trashNameHash(base)
suffix := "." + hash
if attempt > 0 {
suffix = fmt.Sprintf(".%s.%d", hash, attempt)
}
prefixLimit := maxTrashEntryNameBytes - len(suffix)
if prefixLimit <= 0 {
return suffix[len(suffix)-maxTrashEntryNameBytes:]
}
if len(base) > prefixLimit {
base = base[:prefixLimit]View on GitHub (pinned to b72f550bc6)
When it happens
Trigger: Thrown at src/internal/trash/trash_linux.go:264 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of yorukot/superfile@b72f550bc6 (2026-09-01).
Data as JSON: /api/errors/d367e8393e4c9bb4.
Report an issue: GitHub.