Skip to content

_⚠️ Potential issue_ | _🟠 Major_ #4

@CoderSerio

Description

@CoderSerio

⚠️ Potential issue | 🟠 Major

Implement retry logic or remove unused max_retries and retry_delay fields.

The RmOptions struct declares max_retries and retry_delay fields that are never used in the implementation. Users can pass these options, but they will be silently ignored, creating an API surface inconsistency with the promised functionality.

Either implement the retry logic (wrapping operations in a retry loop with exponential backoff based on these options) or remove these fields from RmOptions to avoid misleading users.

Implementation guidance

If implementing retry logic, wrap the operations in remove_recursive with a retry loop that:

  • Catches transient filesystem errors (e.g., PermissionDenied, ResourceBusy)
  • Retries up to max_retries times with retry_delay milliseconds between attempts
  • Only retries on errors that are likely transient, not permanent failures like ENOENT

Originally posted by @coderabbitai[bot] in #2 (comment)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions